]> granicus.if.org Git - php/commitdiff
- Fix segfaults on deserialisation of referenced variables.
authorMoriyoshi Koizumi <moriyoshi@php.net>
Sun, 29 Feb 2004 00:26:36 +0000 (00:26 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Sun, 29 Feb 2004 00:26:36 +0000 (00:26 +0000)
# 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

index 4f1bb11e6eff22c2480e651de4e284215cc9f765..27bce4a2ba874389ace22722299bedd9d815e7f7 100644 (file)
@@ -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(&current, &q, endptr, &var_hash TSRMLS_CC)) {
                                php_set_session_var(name, namelen, current, &var_hash TSRMLS_CC);
                        }