]> granicus.if.org Git - php/commitdiff
- Fixed bug #49608 (Using CachingIterator on DirectoryIterator instance segfaults)
authorFelipe Pena <felipe@php.net>
Tue, 8 Mar 2011 19:56:29 +0000 (19:56 +0000)
committerFelipe Pena <felipe@php.net>
Tue, 8 Mar 2011 19:56:29 +0000 (19:56 +0000)
NEWS
ext/spl/spl_directory.c

diff --git a/NEWS b/NEWS
index a09f50e6c6b0bb3b43c936147f245bb4781baa3f..da4ff5bdcc1a6a4fbc614ef28e8ee0b3a79a9f15 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,10 @@
   . Fixed bug #54193 (Integer overflow in shmop_read()). (Felipe)
     Reported by Jose Carlos Norte <jose at eyeos dot org> (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
index f6a2750d06240c00bc78da317c2fa8d6d9cc2fda..421c9f1c851d137dccea0c5db0abc30d5628e691 100755 (executable)
@@ -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);
+       }
 }
 /* }}} */