From 0e482b1b30de3fec60d438e9cf3c1d7b4346a0f1 Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Wed, 30 Aug 2000 18:02:00 +0000 Subject: [PATCH] - 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) --- main/main.c | 2 -- 1 file changed, 2 deletions(-) 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; -- 2.50.1