Skip to content

Commit 1fa58ec

Browse files
committed
initialize bucket #0 with nulls (normally it shouldn't be used at all, but if it is - we don't want any memory issues, do we?)
1 parent 08e6fde commit 1fa58ec

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Zend/zend_objects_API.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ ZEND_API void zend_objects_store_init(zend_objects_store *objects, zend_uint ini
3333
objects->top = 1; /* Skip 0 so that handles are true */
3434
objects->size = init_size;
3535
objects->free_list_head = -1;
36+
memset(&objects->object_buckets[0], 0, sizeof(zend_object_store_bucket));
3637
}
3738

3839
ZEND_API void zend_objects_store_destroy(zend_objects_store *objects)

0 commit comments

Comments
 (0)