From 75f83f7bb41f284aa4a78ac31435d4f6ddd19aa4 Mon Sep 17 00:00:00 2001 From: Moriyoshi Koizumi Date: Sun, 29 Feb 2004 00:26:36 +0000 Subject: [PATCH] - 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. --- ext/session/session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.50.1