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~26^2~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7536bf963df9422d9604fa92d2243d00c9f26f60;p=php Fixed bug #61273 (call_user_func_array with more than 16333 arguments leaks / crashes) --- diff --git a/NEWS b/NEWS index 5c4c8ac396..03a46976db 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,8 @@ PHP NEWS ?? ??? 2012, PHP 5.3.11 - Core: + . Fixed bug #61273 (call_user_func_array with more than 16333 arguments + leaks / crashes). (Laruence) . Fixed bug #61165 (Segfault - strip_tags()). (Laruence) . Improved max_input_vars directive to check nested variables (Dmitry). . Fixed bug #61095 (Incorect lexing of 0x00*+). (Etienne) 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(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);