Skip to content

Commit fa713ec

Browse files
committed
Fixed bug #80362: Running dtrace scripts can cause php to crash
Patch by al at coralnet dot name.
1 parent 221345a commit fa713ec

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ PHP NEWS
88
. Fixed bug #80345 (PHPIZE configuration has outdated PHP_RELEASE_VERSION).
99
(cmb)
1010
. Fixed bug #72964 (White space not unfolded for CC/Bcc headers). (cmb)
11+
. Fixed bug #80362 (Running dtrace scripts can cause php to crash).
12+
(al at coralnet dot name)
1113

1214
- Tidy:
1315
. Fixed bug #77594 (ob_tidyhandler is never reset). (cmb)

Zend/zend.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1309,7 +1309,9 @@ static ZEND_COLD void zend_error_va_list(
13091309
#ifdef HAVE_DTRACE
13101310
if (DTRACE_ERROR_ENABLED()) {
13111311
char *dtrace_error_buffer;
1312-
zend_vspprintf(&dtrace_error_buffer, 0, format, args);
1312+
va_copy(usr_copy, args);
1313+
zend_vspprintf(&dtrace_error_buffer, 0, format, usr_copy);
1314+
va_end(usr_copy);
13131315
DTRACE_ERROR(dtrace_error_buffer, (char *)error_filename, error_lineno);
13141316
efree(dtrace_error_buffer);
13151317
}

0 commit comments

Comments
 (0)