File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 3
3
?? ??? 2016 PHP 7.0.7
4
4
5
5
- Core:
6
+ . Fixed bug #72162 (use-after-free - error_reporting). (Laruence)
6
7
. Add compiler option to disable special case function calls. (Joe)
7
8
. Fixed bug #72101 (crash on complex code). (Dmitry)
8
9
. Fixed bug #72100 (implode() inserts garbage into resulting string when
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #72162 (use-after-free - error_reporting)
3
+ --FILE--
4
+ <?php
5
+ error_reporting (1 );
6
+ $ var11 = new StdClass ();
7
+ $ var16 = error_reporting ($ var11 );
8
+ ?>
9
+ okey
10
+ --EXPECT--
11
+ okey
Original file line number Diff line number Diff line change @@ -704,7 +704,8 @@ ZEND_FUNCTION(error_reporting)
704
704
#endif
705
705
706
706
old_error_reporting = EG (error_reporting );
707
- if (ZEND_NUM_ARGS () != 0 ) {
707
+ if (ZEND_NUM_ARGS () != 0 ) {
708
+ zend_string * new_val = zval_get_string (err );
708
709
do {
709
710
zend_ini_entry * p = EG (error_reporting_ini_entry );
710
711
@@ -730,7 +731,7 @@ ZEND_FUNCTION(error_reporting)
730
731
zend_string_release (p -> value );
731
732
}
732
733
733
- p -> value = zval_get_string ( err ) ;
734
+ p -> value = new_val ;
734
735
if (Z_TYPE_P (err ) == IS_LONG ) {
735
736
EG (error_reporting ) = Z_LVAL_P (err );
736
737
} else {
You can’t perform that action at this time.
0 commit comments