From: Felipe Pena Date: Sun, 8 Aug 2010 23:56:29 +0000 (+0000) Subject: - Fixed bug #50481 (Storing many SPLFixedArray in an array crashes) X-Git-Tag: php-5.3.4RC1~381 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=904b9282fee046c5d224ef096540d0d817afcd38;p=php - Fixed bug #50481 (Storing many SPLFixedArray in an array crashes) --- diff --git a/NEWS b/NEWS index 2ced1600be..ba86a50823 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,7 @@ PHP NEWS - Fixed bug #51610 (Using oci_connect causes PHP to take a long time to exit). Requires Oracle bug fix 9891199 for this patch to have an effect. (Oracle Corp.) +- Fixed bug #50481 (Storing many SPLFixedArray in an array crashes). (Felipe) 22 Jul 2010, PHP 5.3.3 - Upgraded bundled sqlite to version 3.6.23.1. (Ilia) diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c index 783c854e5e..d7dd244298 100644 --- a/ext/spl/spl_fixedarray.c +++ b/ext/spl/spl_fixedarray.c @@ -158,6 +158,9 @@ static HashTable* spl_fixedarray_object_get_properties(zval *obj TSRMLS_DC) /* { zend_hash_index_update(intern->std.properties, i, (void *)&intern->array->elements[i], sizeof(zval *), NULL); Z_ADDREF_P(intern->array->elements[i]); } else { + if (GC_G(gc_active)) { + return NULL; + } zend_hash_index_update(intern->std.properties, i, (void *)&EG(uninitialized_zval_ptr), sizeof(zval *), NULL); Z_ADDREF_P(EG(uninitialized_zval_ptr)); }