diff options
author | Stanislav Malyshev <stas@php.net> | 2013-08-18 17:20:56 -0700 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2013-08-18 17:22:25 -0700 |
commit | 14f5732096575f3c4ff0438e6650238370cb465c (patch) | |
tree | 7f75da5d15b2229ac55341a0a3f8bb650b3dc083 | |
parent | 9973658a44090cbf67cb8a1d93f00d46a4330356 (diff) | |
download | php-git-14f5732096575f3c4ff0438e6650238370cb465c.tar.gz |
Fix bug #65470 Segmentation fault in zend_error() with --enable-dtrace
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | Zend/zend.c | 6 |
2 files changed, 6 insertions, 2 deletions
@@ -3,6 +3,8 @@ PHP NEWS ?? ??? 2013, PHP 5.4.19 - Core: + . Fixed bug #65470 (Segmentation fault in zend_error() with + --enable-dtrace). (Chris Jones) . Fixed bug #65372 (Segfault in gc_zval_possible_root when return reference fails). (Laruence) . Fixed bug #65304 (Use of max int in array_sum). (Laruence) diff --git a/Zend/zend.c b/Zend/zend.c index 85603082c0..162922866b 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -1091,17 +1091,19 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */ error_filename = "Unknown"; } - va_start(args, format); - #ifdef HAVE_DTRACE if(DTRACE_ERROR_ENABLED()) { char *dtrace_error_buffer; + va_start(args, format); zend_vspprintf(&dtrace_error_buffer, 0, format, args); DTRACE_ERROR(dtrace_error_buffer, (char *)error_filename, error_lineno); efree(dtrace_error_buffer); + va_end(args); } #endif /* HAVE_DTRACE */ + va_start(args, format); + /* if we don't have a user defined error handler */ if (!EG(user_error_handler) || !(EG(user_error_handler_error_reporting) & type) |