cvs: php-src(PHP_5_2) / NEWS /ext/spl spl_iterators.c /ext/spl/tests bug46031.phpt

From: Date: Tue, 09 Sep 2008 19:44:25 +0000
Subject: cvs: php-src(PHP_5_2) / NEWS /ext/spl spl_iterators.c /ext/spl/tests bug46031.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-53011@lists.php.net to get a copy of this message
lbarnaud Tue Sep 9 19:44:25 2008 UTC Added files: (Branch: PHP_5_2) /php-src/ext/spl/tests bug46031.phpt Modified files: /php-src NEWS /php-src/ext/spl spl_iterators.c Log: MFH: Fixed bug #46031 (Segfault in AppendIterator::next) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1216&r2=1.2027.2.547.2.1217&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1216 php-src/NEWS:1.2027.2.547.2.1217 --- php-src/NEWS:1.2027.2.547.2.1216 Sun Sep 7 23:10:07 2008 +++ php-src/NEWS Tue Sep 9 19:44:24 2008 @@ -19,6 +19,7 @@ - Fixed a crash on invalid method in ReflectionParameter constructor. (Christian Seiler) +- Fixed bug #46031 (Segfault in AppendIterator::next). (Arnaud) - Fixed bug #46010 (warnings incorrectly generated for iv in ecb mode). (Felipe) - Fixed bug #45405 (snmp extension memory leak). (Federico Cuello, Rodrigo http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_iterators.c?r1=1.73.2.30.2.31&r2=1.73.2.30.2.32&diff_format=u Index: php-src/ext/spl/spl_iterators.c diff -u php-src/ext/spl/spl_iterators.c:1.73.2.30.2.31 php-src/ext/spl/spl_iterators.c:1.73.2.30.2.32 --- php-src/ext/spl/spl_iterators.c:1.73.2.30.2.31 Wed Mar 12 13:24:24 2008 +++ php-src/ext/spl/spl_iterators.c Tue Sep 9 19:44:25 2008 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_iterators.c,v 1.73.2.30.2.31 2008/03/12 13:24:24 colder Exp $ */ +/* $Id: spl_iterators.c,v 1.73.2.30.2.32 2008/09/09 19:44:25 lbarnaud Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -1118,6 +1118,9 @@ static inline int spl_dual_it_valid(spl_dual_it_object *intern TSRMLS_DC) { + if (!intern->inner.iterator) { + return FAILURE; + } /* FAILURE / SUCCESS */ return intern->inner.iterator->funcs->valid(intern->inner.iterator TSRMLS_CC); } http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/bug46031.phpt?view=markup&rev=1.1 Index: php-src/ext/spl/tests/bug46031.phpt +++ php-src/ext/spl/tests/bug46031.phpt --TEST-- Bug #46031 (Segfault in AppendIterator::next) --FILE-- <?php $x = new AppendIterator(); var_dump($x->next()); ?> --EXPECT-- NULL

« previous php.cvs (#53011) next »