dmitry Wed Nov 16 04:31:22 2005 EDT
Added files: (Branch: PHP_5_1)
/php-src/ext/standard/tests/general_functions bug35229.phpt
Modified files:
/php-src NEWS
/php-src/ext/standard basic_functions.c
Log:
Fixed bug #35229 (call_user_func() crashes when arguement_stack is nearly
full)
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.193&r2=1.2027.2.194&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.193 php-src/NEWS:1.2027.2.194
--- php-src/NEWS:1.2027.2.193 Tue Nov 15 11:53:14 2005
+++ php-src/NEWS Wed Nov 16 04:31:19 2005
@@ -7,6 +7,8 @@
- Fixed bug in mysqli extension with unsigned int(11) being represented as
signed integer in PHP instead of string in 32bit systems. (Andrey)
- Fixed initializing and argument checking for posix_mknod(). (Derick)
+- Fixed bug #35229 (call_user_func() crashes when arguement_stack is nearly
+ full). (Dmitry)
- Fixed bug #35197 (Destructor is not called). (Tony)
- Fixed bug #35179 (tokenizer extension needs T_HALT_COMPILER). (Greg)
- Fixed bug #35176 (include()/require()/*_once() produce wrong error messages
http://cvs.php.net/diff.php/php-src/ext/standard/basic_functions.c?r1=1.725.2.5&r2=1.725.2.6&ty=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.5
php-src/ext/standard/basic_functions.c:1.725.2.6
--- php-src/ext/standard/basic_functions.c:1.725.2.5 Sun Oct 30 13:03:30 2005
+++ php-src/ext/standard/basic_functions.c Wed Nov 16 04:31:20 2005
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: basic_functions.c,v 1.725.2.5 2005/10/30 18:03:30 iliaa Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.6 2005/11/16 09:31:20 dmitry Exp $ */
#include "php.h"
#include "php_streams.h"
@@ -2025,7 +2025,7 @@
params = safe_emalloc(sizeof(zval **), argc, 0);
- if (zend_get_parameters_array_ex(argc, params) == FAILURE) {
+ if (zend_get_parameters_array_ex(1, params) == FAILURE) {
efree(params);
RETURN_FALSE;
}
@@ -2042,6 +2042,11 @@
RETURN_NULL();
}
+ if (zend_get_parameters_array_ex(argc, params) == FAILURE) {
+ efree(params);
+ RETURN_FALSE;
+ }
+
if (call_user_function_ex(EG(function_table), NULL, *params[0],
&retval_ptr, argc-1, params+1, 0, NULL TSRMLS_CC) == SUCCESS) {
if (retval_ptr) {
COPY_PZVAL_TO_ZVAL(*return_value, retval_ptr);
http://cvs.php.net/co.php/php-src/ext/standard/tests/general_functions/bug35229.phpt?r=1.1&p=1
Index: php-src/ext/standard/tests/general_functions/bug35229.phpt
+++ php-src/ext/standard/tests/general_functions/bug35229.phpt
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php