diff options
author | Stanislav Malyshev <stas@php.net> | 2016-10-11 16:26:35 -0700 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2016-10-11 16:26:35 -0700 |
commit | 689a9b8def07875641b3132a82c701fb7acb676c (patch) | |
tree | 22120cf5e4c46ede692518256e8019178e90c1a8 /Zend/zend_API.c | |
parent | 4165d976066129000d947ffa3be73f91e9867635 (diff) | |
parent | 082d1f237531ab71c3050dfb9f598344f654d9e1 (diff) | |
download | php-git-689a9b8def07875641b3132a82c701fb7acb676c.tar.gz |
Merge branch 'PHP-5.6.27' into PHP-5.6
* PHP-5.6.27:
Fix tests
fix tsrm
Fix bug #73284 - heap overflow in php_ereg_replace function
Fix bug #73276 - crash in openssl_random_pseudo_bytes function
Fix bug #73293 - NULL pointer dereference in SimpleXMLElement::asXML()
fix bug #73275 - crash in openssl_encrypt function
Fix for #73240 - Write out of bounds at number_format
Bug #73218: add mitigation for ICU int overflow
Add more locale length checks, due to ICU bugs.
Fix bug #73208 - another missing length check
Fix bug #73190: memcpy negative parameter _bc_new_num_ex
Fix bug #73189 - Memcpy negative size parameter php_resolve_path
Fixed bug #73174 - heap overflow in php_pcre_replace_impl
Fix bug #73150: missing NULL check in dom_document_save_html
Fix bug #73147: Use After Free in PHP7 unserialize()
Fix bug #73082
Fix bug #73073 - CachingIterator null dereference when convert to string
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r-- | Zend/zend_API.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 8202b9a505..0757cc9261 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -3776,6 +3776,30 @@ ZEND_API void zend_update_property(zend_class_entry *scope, zval *object, const } /* }}} */ +ZEND_API void zend_unset_property(zend_class_entry *scope, zval *object, const char *name, int name_length TSRMLS_DC) /* {{{ */ +{ + zval *property; + zend_class_entry *old_scope = EG(scope); + + EG(scope) = scope; + + if (!Z_OBJ_HT_P(object)->unset_property) { + const char *class_name; + zend_uint class_name_len; + + zend_get_object_classname(object, &class_name, &class_name_len TSRMLS_CC); + + zend_error(E_CORE_ERROR, "Property %s of class %s cannot be unset", name, class_name); + } + MAKE_STD_ZVAL(property); + ZVAL_STRINGL(property, name, name_length, 1); + Z_OBJ_HT_P(object)->unset_property(object, property, 0 TSRMLS_CC); + zval_ptr_dtor(&property); + + EG(scope) = old_scope; +} +/* }}} */ + ZEND_API void zend_update_property_null(zend_class_entry *scope, zval *object, const char *name, int name_length TSRMLS_DC) /* {{{ */ { zval *tmp; |