1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 15:38:49 +02:00

Fixed reference handling in zif_unserialize

This commit is contained in:
Xinchen Hui
2014-02-26 11:21:52 +08:00
parent f4a70fa759
commit c146752812
+3 -3
View File
@@ -978,9 +978,9 @@ PHP_FUNCTION(unserialize)
}
PHP_VAR_UNSERIALIZE_DESTROY(var_hash);
if (consumed) {
zval_dtor(consumed);
ZVAL_LONG(consumed, ((char*)p) - buf);
if (consumed && Z_ISREF_P(consumed)) {
zval_dtor(Z_REFVAL_P(consumed));
ZVAL_LONG(Z_REFVAL_P(consumed), ((char*)p) - buf);
}
}
/* }}} */