From 904b9282fee046c5d224ef096540d0d817afcd38 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Sun, 8 Aug 2010 23:56:29 +0000 Subject: [PATCH] - Fixed bug #50481 (Storing many SPLFixedArray in an array crashes) --- NEWS | 1 + ext/spl/spl_fixedarray.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/NEWS b/NEWS index 2ced1600be0..ba86a50823f 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 783c854e5ef..d7dd244298d 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)); }