]> granicus.if.org Git - php/commitdiff
- Fixed bug #50481 (Storing many SPLFixedArray in an array crashes)
authorFelipe Pena <felipe@php.net>
Sun, 8 Aug 2010 23:56:29 +0000 (23:56 +0000)
committerFelipe Pena <felipe@php.net>
Sun, 8 Aug 2010 23:56:29 +0000 (23:56 +0000)
NEWS
ext/spl/spl_fixedarray.c

diff --git a/NEWS b/NEWS
index 2ced1600be087dbc668515a525d27eb89a0af199..ba86a50823f593b8c67db275519d1f402e3aacc0 100644 (file)
--- 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)
index 783c854e5ef6872fed6f02c7268b751e2cb254bf..d7dd244298d5721d275a99a9575ab07d7051d997 100644 (file)
@@ -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));
                        }