From: Moriyoshi Koizumi Date: Sun, 29 Feb 2004 00:26:36 +0000 (+0000) Subject: - Fix segfaults on deserialisation of referenced variables. X-Git-Tag: RELEASE_0_2_0~121 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=75f83f7bb41f284aa4a78ac31435d4f6ddd19aa4;p=php - Fix segfaults on deserialisation of referenced variables. # ALLOC_INIT_ZVAL() initialises the type field to IS_NULL, while # MAKE_STD_ZVAL() doesn't. This caused a kind of random crash # when zval_ptr_dtor() was applied on an intact zval created by # the latter method. # # Please check relevant bugs again. There should be some that # have already been marked as bogus. --- diff --git a/ext/session/session.c b/ext/session/session.c index 4f1bb11e6e..27bce4a2ba 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -498,7 +498,7 @@ PS_SERIALIZER_DECODE_FUNC(php) q++; if (has_value) { - MAKE_STD_ZVAL(current); + ALLOC_INIT_ZVAL(current); if (php_var_unserialize(¤t, &q, endptr, &var_hash TSRMLS_CC)) { php_set_session_var(name, namelen, current, &var_hash TSRMLS_CC); }