helly Sat Mar 13 15:01:02 2004 EDT Modified files: /php-src/ext/spl spl_array.c /php-src NEWS Log: Bugfix #27586 ArrayObject::getIterator crashes with [] assignment http://cvs.php.net/diff.php/php-src/ext/spl/spl_array.c?r1=1.34&r2=1.35&ty=u Index: php-src/ext/spl/spl_array.c diff -u php-src/ext/spl/spl_array.c:1.34 php-src/ext/spl/spl_array.c:1.35 --- php-src/ext/spl/spl_array.c:1.34 Mon Mar 8 12:33:29 2004 +++ php-src/ext/spl/spl_array.c Sat Mar 13 15:00:56 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_array.c,v 1.34 2004/03/08 17:33:29 helly Exp $ */ +/* $Id: spl_array.c,v 1.35 2004/03/13 20:00:56 helly Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -196,6 +196,11 @@ spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC); long index; + if (!offset) { + value->refcount++; + add_next_index_zval(intern->array, value); + return; + } switch(Z_TYPE_P(offset)) { case IS_STRING: value->refcount++; http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1627&r2=1.1628&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1627 php-src/NEWS:1.1628 --- php-src/NEWS:1.1627 Thu Mar 11 10:08:46 2004 +++ php-src/NEWS Sat Mar 13 15:01:00 2004 @@ -21,6 +21,8 @@ - Fixed problem preventing startup errors from being displayed. (Marcus) - Fixed start-up problem if both SPL and SimpleXML were enabled. The double initialization of apache 1.3 was causing problems here. (Marcus, Derick) +- Fixed bug #27586 (ArrayObject::getIterator crashes with [] assignment). + (Marcus) - Fixed bug #27537 (Objects pointing to each other segfaults). (Dmitry) - Fixed bug #27338 (memory leak inside tsrm_virtual_cwd.c on win32). (Ilia) - Fixed bug #27287 (wddx segfaults during deserialization). (Moriyoshi)
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php