mirror of
https://github.com/php-win-ext/php-lua.git
synced 2026-03-24 00:52:12 +01:00
fix incorrect type alloc that causes memory corruption
This commit is contained in:
@@ -75,7 +75,7 @@ PHP_METHOD(lua_closure, invoke) {
|
||||
zval rv;
|
||||
|
||||
if (ZEND_NUM_ARGS()) {
|
||||
arguments = emalloc(sizeof(zval*) * ZEND_NUM_ARGS());
|
||||
arguments = emalloc(sizeof(zval) * ZEND_NUM_ARGS());
|
||||
if (zend_get_parameters_array_ex(ZEND_NUM_ARGS(), arguments) == FAILURE) {
|
||||
efree(arguments);
|
||||
zend_throw_exception_ex(NULL, 0, "cannot get arguments for calling closure");
|
||||
|
||||
Reference in New Issue
Block a user