Skip to content

Commit 9dac923

Browse files
committed
Merge branch 'PHP-5.6'
Conflicts: ext/standard/var_unserializer.c ext/standard/var_unserializer.re
2 parents ddd9411 + 169ac35 commit 9dac923

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--TEST--
2+
Bug #69139 (Crash in gc_zval_possible_root on unserialize)
3+
--FILE--
4+
<?php
5+
$str = 'a:1126666:{i:0;r:1;i:-09610;r:1;i:-0;i:0;i:0;O:1:"A":2119X:i:0;i:0;i:0;i:0;i:0;O:1:"A":2116:{i:0;r:5;i:-096766610;r:1;i:-610;r:1;i:0;i:0;';
6+
@unserialize($str);
7+
echo "Alive";
8+
?>
9+
--EXPECT--
10+
Alive

ext/standard/var.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,7 @@ PHP_FUNCTION(unserialize)
10361036
zend_hash_destroy(class_hash);
10371037
FREE_HASHTABLE(class_hash);
10381038
}
1039-
zval_dtor(return_value);
1039+
zval_ptr_dtor(return_value);
10401040
if (!EG(exception)) {
10411041
php_error_docref(NULL, E_NOTICE, "Error at offset " ZEND_LONG_FMT " of %d bytes", (zend_long)((char*)p - buf), buf_len);
10421042
}

0 commit comments

Comments
 (0)