From 3740805aa5cb05fa7818ff5d4dafe8933ab880dc Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 11 Jan 1997 05:51:38 +0000 Subject: Nate Williams's patches to make this work. svn path=/trunk/; revision=739 --- report.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'report.c') diff --git a/report.c b/report.c index 0dbfdf6e..0c064e01 100644 --- a/report.c +++ b/report.c @@ -294,7 +294,8 @@ error_build (message, va_alist) partial_message = xrealloc (partial_message, partial_message_size); } #else - sprintf (partial_message + partial_message_size_used, message, a1, a2, a3, a4, a5, a6, a7, a8); + VA_START (args, message); + vsprintf (partial_message + partial_message_size_used, message, args); /* Attempt to catch memory overwrites... */ if ((partial_message_size_used = strlen (partial_message)) >= partial_message_size) @@ -302,6 +303,7 @@ error_build (message, va_alist) partial_message_size_used = 0; error (PS_UNDEFINED, 0, "partial error message buffer overflow"); } + va_end (args); #endif #endif @@ -384,7 +386,8 @@ error_complete (status, errnum, message, va_alist) partial_message = xrealloc (partial_message, partial_message_size); } #else - sprintf (partial_message + partial_message_size_used, message, a1, a2, a3, a4, a5, a6, a7, a8); + VA_START (args, message); + vsprintf (partial_message + partial_message_size_used, message, args); /* Attempt to catch memory overwrites... */ if ((partial_message_size_used = strlen (partial_message)) >= partial_message_size) @@ -392,6 +395,7 @@ error_complete (status, errnum, message, va_alist) partial_message_size_used = 0; error (PS_UNDEFINED, 0, "partial error message buffer overflow"); } + va_end (args); #endif #endif -- cgit v1.2.3