com php-src: It's safer to use zval_ptr_dtor() for iterator keys.: ext/phar/phar_object.c ext/soap/p hp_encoding.c

From: Date: Thu, 05 Jul 2018 13:56:52 +0000
Subject: com php-src: It's safer to use zval_ptr_dtor() for iterator keys.: ext/phar/phar_object.c ext/soap/p hp_encoding.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-102423@lists.php.net to get a copy of this message
Commit: 43d5a3665ddc8b871ccdcd10c4ffde408cd28d35 Author: Dmitry Stogov <dmitry@zend.com> Thu, 5 Jul 2018 16:56:52 +0300 Parents: d0a6b1009f8066ca16fd1c947183c8499c2cd95e Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=43d5a3665ddc8b871ccdcd10c4ffde408cd28d35 Log: It's safer to use zval_ptr_dtor() for iterator keys. Changed paths: M ext/phar/phar_object.c M ext/soap/php_encoding.c Diff: diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 2e35145..2c404ca 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -1439,7 +1439,7 @@ static int phar_build(zend_object_iterator *iter, void *puser) /* {{{ */ } if (Z_TYPE(key) != IS_STRING) { - zval_dtor(&key); + zval_ptr_dtor(&key); zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %s returned an invalid key (must return a string)", ZSTR_VAL(ce->name)); return ZEND_HASH_APPLY_STOP; } @@ -1567,7 +1567,7 @@ phar_spl_fileinfo: } if (Z_TYPE(key) != IS_STRING) { - zval_dtor(&key); + zval_ptr_dtor(&key); zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %s returned an invalid key (must return a string)", ZSTR_VAL(ce->name)); return ZEND_HASH_APPLY_STOP; } diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c index 0962e40..628c4e0 100644 --- a/ext/soap/php_encoding.c +++ b/ext/soap/php_encoding.c @@ -2266,7 +2266,7 @@ static xmlNodePtr to_xml_array(encodeTypePtr type, zval *data, int style, xmlNod } array_set_zval_key(Z_ARRVAL(array_copy), &key, val); zval_ptr_dtor(val); - zval_dtor(&key); + zval_ptr_dtor(&key); } else { add_next_index_zval(&array_copy, val); }

« previous php.cvs (#102423) next »