dmitry          Wed Nov 16 04:30:54 2005 EDT

  Added files:                 (Branch: PHP_5_0)
    /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.1760.2.512&r2=1.1760.2.513&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1760.2.512 php-src/NEWS:1.1760.2.513
--- php-src/NEWS:1.1760.2.512   Mon Nov 14 16:57:14 2005
+++ php-src/NEWS        Wed Nov 16 04:30:45 2005
@@ -4,6 +4,8 @@
 - Fixed an error in mysqli_fetch_fields (returned NULL instead of an
   array when row number > field_count). (Georg)
 - Renamed CachingRecursiveIterator to RecursiveCachingIterator. (Marcus)
+- Fixed bug #35229 (call_user_func() crashes when arguement_stack is nearly
+  full). (Dmitry)
 - Fixed bug #35197 (Destructor is not called). (Tony)
 - Fixed bug #35009 (ZTS: Persistent resource destruct crashes when extension
   is compiled as shared). (Dmitry)
http://cvs.php.net/diff.php/php-src/ext/standard/basic_functions.c?r1=1.673.2.21&r2=1.673.2.22&ty=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.673.2.21 
php-src/ext/standard/basic_functions.c:1.673.2.22
--- php-src/ext/standard/basic_functions.c:1.673.2.21   Thu Sep 29 12:31:20 2005
+++ php-src/ext/standard/basic_functions.c      Wed Nov 16 04:30:51 2005
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: basic_functions.c,v 1.673.2.21 2005/09/29 16:31:20 iliaa Exp $ */
+/* $Id: basic_functions.c,v 1.673.2.22 2005/11/16 09:30:51 dmitry Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -1891,7 +1891,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;
        }
@@ -1908,6 +1908,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

Reply via email to