com php-src: Don't keep dangling pointer to function_name: ext/intl/converter/converter.c
| From: | Dmitry Stogov | Date: | Thu, 05 Jul 2018 09:20:50 +0000 |
| Subject: | com php-src: Don't keep dangling pointer to function_name: ext/intl/converter/converter.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-102412@lists.php.net to get a copy of this message | ||
Commit: 0d235517a36ea99c7fc1116e0dc90cba3c21a1f7
Author: Dmitry Stogov <dmitry@zend.com> Thu, 5 Jul 2018 12:20:50 +0300
Parents: b6cc4d2009a7df108c2858f28750d01e55c6de24
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0d235517a36ea99c7fc1116e0dc90cba3c21a1f7
Log:
Don't keep dangling pointer to function_name
Changed paths:
M ext/intl/converter/converter.c
Diff:
diff --git a/ext/intl/converter/converter.c b/ext/intl/converter/converter.c
index 079f69e..95b0e65 100644
--- a/ext/intl/converter/converter.c
+++ b/ext/intl/converter/converter.c
@@ -542,7 +542,8 @@ static void php_converter_resolve_callback(zval *zobj,
if (zend_fcall_info_init(&caller, 0, finfo, fcache, NULL, &errstr) == FAILURE) {
php_converter_throw_failure(objval, U_INTERNAL_PROGRAM_ERROR, "Error setting converter
callback: %s", errstr);
}
- zval_dtor(&caller);
+ zend_array_destroy(Z_ARR(caller));
+ ZVAL_UNDEF(&finfo->function_name);
if (errstr) {
efree(errstr);
}