File tree Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 8
8
. Fixed bug #79806 (realpath() erroneously resolves link to link). (cmb)
9
9
. Fixed bug #79895 (PHP_CHECK_GCC_ARG does not allow flags with equal sign).
10
10
(Santiago M. Mola)
11
+ . Fixed bug #79919 (Stack use-after-scope in define()). (cmb)
11
12
12
13
- LDAP:
13
14
. Fixed memory leaks. (ptomulik)
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #79919 (Stack use-after-scope in define())
3
+ --SKIPIF--
4
+ <?php
5
+ if (!extension_loaded ('simplexml ' )) die ('skip simplexml extension not available ' );
6
+ ?>
7
+ --FILE--
8
+ <?php
9
+ $ b = error_log (0 );
10
+ $ b = simplexml_load_string ('<xml/> ' , null , $ b );
11
+ define (0 , $ b );
12
+ ?>
13
+ --EXPECT--
14
+ 0
Original file line number Diff line number Diff line change @@ -882,9 +882,7 @@ ZEND_FUNCTION(define)
882
882
case IS_OBJECT :
883
883
if (Z_TYPE (val_free ) == IS_UNDEF ) {
884
884
if (Z_OBJ_HT_P (val )-> get ) {
885
- zval rv ;
886
- val = Z_OBJ_HT_P (val )-> get (val , & rv );
887
- ZVAL_COPY_VALUE (& val_free , val );
885
+ val = Z_OBJ_HT_P (val )-> get (val , & val_free );
888
886
goto repeat ;
889
887
} else if (Z_OBJ_HT_P (val )-> cast_object ) {
890
888
if (Z_OBJ_HT_P (val )-> cast_object (val , & val_free , IS_STRING ) == SUCCESS ) {
You can’t perform that action at this time.
0 commit comments