com php-src: Closure::fromCallable(): Fix stack corruption: Zend/zend_closures.c
| From: | Nikita Popov | Date: | Tue, 05 Jul 2016 12:54:35 +0000 |
| Subject: | com php-src: Closure::fromCallable(): Fix stack corruption: Zend/zend_closures.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-92796@lists.php.net to get a copy of this message | ||
Commit: 041476f4ae1eecce97acd7b02c871b373d4cc0e5
Author: Nikita Popov <nikic@php.net> Tue, 5 Jul 2016 14:53:20 +0200
Parents: 2b46e3c71086307d462ee709929f862ba58ee010
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=041476f4ae1eecce97acd7b02c871b373d4cc0e5
Log:
Closure::fromCallable(): Fix stack corruption
So the tests work at least...
Changed paths:
M Zend/zend_closures.c
Diff:
diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c
index 8d101dd..5c5e8a6 100644
--- a/Zend/zend_closures.c
+++ b/Zend/zend_closures.c
@@ -269,6 +269,7 @@ static int zend_create_closure_from_callable(zval *return_value, zval *callable,
zend_fcall_info_cache fcc;
zend_function *mptr;
zval instance;
+ zend_internal_function call;
if (!zend_is_callable_ex(callable, NULL, 0, NULL, &fcc, error)) {
return FAILURE;
@@ -280,7 +281,6 @@ static int zend_create_closure_from_callable(zval *return_value, zval *callable,
}
if (mptr->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) {
- zend_internal_function call;
memset(&call, 0, sizeof(zend_internal_function));
call.type = ZEND_INTERNAL_FUNCTION;