mirror of
https://github.com/php/php-src.git
synced 2024-11-25 19:05:31 +08:00
- 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)
This commit is contained in:
parent
9d62ac18ce
commit
0e482b1b30
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user