php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #65470
Patch bug65470 revision 2013-08-18 05:05 UTC by sixd@php.net

Patch bug65470 for Reproducible crash Bug #65470

Patch version 2013-08-18 05:05 UTC

Return to Bug #65470 | Download this patch
Patch Revisions:

Developer: sixd@php.net

diff --git a/Zend/zend.c b/Zend/zend.c
index 8560308..1629228 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)
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Sun Apr 20 10:02:06 2014 UTC