?? ??? 2016 PHP 7.0.7
- Core:
+ . Fixed bug #72162 (use-after-free - error_reporting). (Laruence)
. Add compiler option to disable special case function calls. (Joe)
. Fixed bug #72101 (crash on complex code). (Dmitry)
. Fixed bug #72100 (implode() inserts garbage into resulting string when
--- /dev/null
+--TEST--
+Bug #72162 (use-after-free - error_reporting)
+--FILE--
+<?php
+error_reporting(1);
+$var11 = new StdClass();
+$var16 = error_reporting($var11);
+?>
+okey
+--EXPECT--
+okey
#endif
old_error_reporting = EG(error_reporting);
- if(ZEND_NUM_ARGS() != 0) {
+ if (ZEND_NUM_ARGS() != 0) {
+ zend_string *new_val = zval_get_string(err);
do {
zend_ini_entry *p = EG(error_reporting_ini_entry);
zend_string_release(p->value);
}
- p->value = zval_get_string(err);
+ p->value = new_val;
if (Z_TYPE_P(err) == IS_LONG) {
EG(error_reporting) = Z_LVAL_P(err);
} else {