]> granicus.if.org Git - php/commitdiff
Fixed invalid read in ext/pdo/tests/pdo_025.phpt(pgsql)
authorXinchen Hui <laruence@php.net>
Fri, 16 May 2014 11:11:38 +0000 (19:11 +0800)
committerXinchen Hui <laruence@php.net>
Fri, 16 May 2014 11:11:38 +0000 (19:11 +0800)
Zend/zend_objects_API.c

index bd6673c0bb287d7060658f3ae0edac283e3c756d..01a403f66c725ef5ae4d28be6bc4f94d77b91879 100644 (file)
@@ -79,7 +79,7 @@ ZEND_API void zend_objects_store_free_object_storage(zend_objects_store *objects
        zend_uint i;
 
        /* Free object properties but don't free object their selves */
-       for (i = 1; i < objects->top ; i++) {
+       for (i = objects->top - 1; i > 0 ; i--) {
                zend_object *obj = objects->object_buckets[i];
 
                if (IS_OBJ_VALID(obj)) {