]> granicus.if.org Git - php/commitdiff
- Possible fix for bug #54609 (Certain implementation(s) of SplFixedArray cause hard...
authorFelipe Pena <felipe@php.net>
Sun, 5 Jun 2011 01:38:12 +0000 (01:38 +0000)
committerFelipe Pena <felipe@php.net>
Sun, 5 Jun 2011 01:38:12 +0000 (01:38 +0000)
ext/spl/spl_fixedarray.c

index 87a3a02f939675804c9bec7a2e1c3e3a1f9f9df1..c61f06bc084c3367eccdd9a7d3f03054df14ab09 100644 (file)
@@ -152,7 +152,7 @@ static HashTable* spl_fixedarray_object_get_properties(zval *obj TSRMLS_DC) /* {
        spl_fixedarray_object *intern  = (spl_fixedarray_object*)zend_object_store_get_object(obj TSRMLS_CC);
        int  i = 0;
 
-       if (intern->array) {
+       if (intern->array && !GC_G(gc_active)) {
                int j = zend_hash_num_elements(intern->std.properties);
 
                for (i = 0; i < intern->array->size; i++) {
@@ -160,9 +160,6 @@ 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));
                        }