diff options
author | Stanislav Malyshev <stas@php.net> | 2016-06-20 21:35:22 -0700 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2016-06-20 21:35:22 -0700 |
commit | f6aef68089221c5ea047d4a74224ee3deead99a6 (patch) | |
tree | b282de0b388add788b11701fabebe6aa5d9f8b41 /ext/zip/php_zip.c | |
parent | 3f627e580acfdaf0595ae3b115b8bec677f203ee (diff) | |
download | php-git-f6aef68089221c5ea047d4a74224ee3deead99a6.tar.gz |
Fix bug #72434: ZipArchive class Use After Free Vulnerability in PHP's GC algorithm and unserialize
Diffstat (limited to 'ext/zip/php_zip.c')
-rw-r--r-- | ext/zip/php_zip.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 99c293c6d7..57d060f4ff 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -1015,6 +1015,14 @@ static int php_zip_has_property(zval *object, zval *member, int type, const zend } /* }}} */ +static HashTable *php_zip_get_gc(zval *object, zval ***gc_data, int *gc_data_count TSRMLS_DC) /* {{{ */ +{ + *gc_data = NULL; + *gc_data_count = 0; + return zend_std_get_properties(object TSRMLS_CC); +} +/* }}} */ + static HashTable *php_zip_get_properties(zval *object TSRMLS_DC)/* {{{ */ { ze_zip_object *obj; @@ -2777,6 +2785,7 @@ static PHP_MINIT_FUNCTION(zip) zip_object_handlers.clone_obj = NULL; zip_object_handlers.get_property_ptr_ptr = php_zip_get_property_ptr_ptr; + zip_object_handlers.get_gc = php_zip_get_gc; zip_object_handlers.get_properties = php_zip_get_properties; zip_object_handlers.read_property = php_zip_read_property; zip_object_handlers.has_property = php_zip_has_property; |