From: Xinchen Hui Date: Sun, 11 Mar 2012 15:28:31 +0000 (+0000) Subject: Fixed bug #61273 (call_user_func_array with more than 16333 arguments leaks / crashes) X-Git-Tag: PHP-5.4.1-RC1~46 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b7ae5e0d86d9528af4ed6bd75821f8cae7c5cb95;p=php Fixed bug #61273 (call_user_func_array with more than 16333 arguments leaks / crashes) --- diff --git a/NEWS b/NEWS index c585895392..6ff05dbe2a 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,8 @@ PHP NEWS . "Connection: close" instead of "Connection: closed" (Gustavo) - Core: + . Fixed bug #61273 (call_user_func_array with more than 16333 arguments + leaks / crashes). (Laruence) . Fixed bug #61225 (Incorect lexing of 0b00*+). (Pierrick) . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) . Fixed bug #61106 (Segfault when using header_register_callback). (Nikita diff --git a/Zend/tests/bug61273.phpt b/Zend/tests/bug61273.phpt new file mode 100644 index 0000000000..9d78b27317 --- /dev/null +++ b/Zend/tests/bug61273.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug #61273 (call_user_func_array with more than 16333 arguments leaks / crashes) +--FILE-- +no_separation && !ARG_MAY_BE_SENT_BY_REF(EX(function_state).function, i + 1)) { - if(i) { + if (i || UNEXPECTED(ZEND_VM_STACK_ELEMETS(EG(argument_stack)) == (EG(argument_stack)->top))) { /* hack to clean up the stack */ zend_vm_stack_push_nocheck((void *) (zend_uintptr_t)i TSRMLS_CC); zend_vm_stack_clear_multiple(TSRMLS_C);