From: Felipe Pena Date: Tue, 8 Mar 2011 19:56:29 +0000 (+0000) Subject: - Fixed bug #49608 (Using CachingIterator on DirectoryIterator instance segfaults) X-Git-Tag: php-5.3.6RC3~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c7e7de3485439bd7f373a9be151f3bd66840c5e0;p=php - Fixed bug #49608 (Using CachingIterator on DirectoryIterator instance segfaults) --- diff --git a/NEWS b/NEWS index a09f50e6c6..da4ff5bdcc 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,10 @@ . Fixed bug #54193 (Integer overflow in shmop_read()). (Felipe) Reported by Jose Carlos Norte (CVE-2011-1092) +- SPL extension: + . Fixed bug #49608 (Using CachingIterator on DirectoryIterator instance + segfaults). (Felipe) + 03 Mar 2011, PHP 5.3.6RC2 - Zend Engine: . Fixed bug #43512 (same parameter name can be used multiple times in diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index f6a2750d06..421c9f1c85 100755 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -1596,7 +1596,9 @@ static void spl_filesystem_dir_it_dtor(zend_object_iterator *iter TSRMLS_DC) iterator->intern.data = NULL; /* mark as unused */ zval_ptr_dtor(&iterator->current); - zval_ptr_dtor(&zfree); + if (zfree) { + zval_ptr_dtor(&zfree); + } } /* }}} */