Skip to content

Commit bcf785f

Browse files
committed
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4: Fix bug #65470 Segmentation fault in zend_error() with --enable-dtrace
2 parents bd29ff7 + 14f5732 commit bcf785f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ PHP NEWS
33
?? ??? 2013, PHP 5.5.3
44

55
- Core:
6+
. Fixed bug #65470 (Segmentation fault in zend_error() with
7+
--enable-dtrace). (Chris Jones)
68
. Fixed bug #65225 (PHP_BINARY incorrectly set). (Patrick Allaert)
79
. Fixed bug #62692 (PHP fails to build with DTrace). (Chris Jones, Kris Van Hees)
810

Zend/zend.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,17 +1092,19 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
10921092
error_filename = "Unknown";
10931093
}
10941094

1095-
va_start(args, format);
1096-
10971095
#ifdef HAVE_DTRACE
10981096
if(DTRACE_ERROR_ENABLED()) {
10991097
char *dtrace_error_buffer;
1098+
va_start(args, format);
11001099
zend_vspprintf(&dtrace_error_buffer, 0, format, args);
11011100
DTRACE_ERROR(dtrace_error_buffer, (char *)error_filename, error_lineno);
11021101
efree(dtrace_error_buffer);
1102+
va_end(args);
11031103
}
11041104
#endif /* HAVE_DTRACE */
11051105

1106+
va_start(args, format);
1107+
11061108
/* if we don't have a user defined error handler */
11071109
if (!EG(user_error_handler)
11081110
|| !(EG(user_error_handler_error_reporting) & type)

0 commit comments

Comments
 (0)