]> granicus.if.org Git - php/commitdiff
Fix crash
authorEtienne Kneuss <colder@php.net>
Tue, 12 Jul 2011 21:57:14 +0000 (21:57 +0000)
committerEtienne Kneuss <colder@php.net>
Tue, 12 Jul 2011 21:57:14 +0000 (21:57 +0000)
ext/spl/spl_dllist.c

index 2c90243a202223b7192ad1d437b0269cd1733554..06d22e1b619e6c157407ed846ef0accf39ba8ccc 100644 (file)
@@ -1202,11 +1202,11 @@ SPL_METHOD(SplDoublyLinkedList, unserialize)
 
        /* flags */
        ALLOC_INIT_ZVAL(flags);
-       if (!php_var_unserialize(&elem, &p, s + buf_len, &var_hash TSRMLS_CC) || Z_TYPE_P(elem) != IS_LONG) {
+       if (!php_var_unserialize(&flags, &p, s + buf_len, &var_hash TSRMLS_CC) || Z_TYPE_P(flags) != IS_LONG) {
                zval_ptr_dtor(&flags);
                goto error;
        }
-       intern->flags = Z_LVAL_P(elem);
+       intern->flags = Z_LVAL_P(flags);
        zval_ptr_dtor(&flags);
 
        /* elements */