]> granicus.if.org Git - php/commitdiff
- Truly fix varargs handling - the current situation was a sure-fire crash in most...
authorZeev Suraski <zeev@php.net>
Wed, 30 Aug 2000 18:02:00 +0000 (18:02 +0000)
committerZeev Suraski <zeev@php.net>
Wed, 30 Aug 2000 18:02:00 +0000 (18:02 +0000)
  (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

index d62eb8db6a44e9097ee49122528be7685f2c812f..38f0d8c841b2eaeb210745296e785a211c9ed554 100644 (file)
@@ -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;