From: Etienne Kneuss Date: Tue, 12 Jul 2011 21:57:14 +0000 (+0000) Subject: Fix crash X-Git-Tag: php-5.4.0alpha2~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0909cafc7d9bb4fdb6f1d9cd9e7a53cd0f2fb619;p=php Fix crash --- diff --git a/ext/spl/spl_dllist.c b/ext/spl/spl_dllist.c index 2c90243a20..06d22e1b61 100644 --- a/ext/spl/spl_dllist.c +++ b/ext/spl/spl_dllist.c @@ -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 */