From: Zeev Suraski Date: Wed, 30 Aug 2000 18:02:00 +0000 (+0000) Subject: - Truly fix varargs handling - the current situation was a sure-fire crash in most... X-Git-Tag: php-4.0.3RC1~412 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0e482b1b30de3fec60d438e9cf3c1d7b4346a0f1;p=php - Truly fix varargs handling - the current situation was a sure-fire crash in most platforms (the older code worked, even though it didn't compile well for some very odd reason, probably a compiler bug; The new code would cause PHP to crash if both display_errors/log_errors and track_errors were enabled) --- diff --git a/main/main.c b/main/main.c index d62eb8db6a..38f0d8c841 100644 --- a/main/main.c +++ b/main/main.c @@ -366,7 +366,6 @@ static void php_error_cb(int type, const char *error_filename, const uint error_ /* get include file name */ if (PG(log_errors) || PG(display_errors) || (!module_initialized)) { size = vsnprintf(buffer, sizeof(buffer) - 1, format, orig_args); - va_end(orig_args); buffer[sizeof(buffer) - 1] = 0; @@ -442,7 +441,6 @@ static void php_error_cb(int type, const char *error_filename, const uint error_ pval *tmp; size = vsnprintf(buffer, sizeof(buffer) - 1, format, orig_args); - va_end(orig_args); buffer[sizeof(buffer) - 1] = 0;