]> granicus.if.org Git - php/commitdiff
fix #29890 - crash when function call fails
authorStanislav Malyshev <stas@php.net>
Wed, 18 May 2005 18:01:13 +0000 (18:01 +0000)
committerStanislav Malyshev <stas@php.net>
Wed, 18 May 2005 18:01:13 +0000 (18:01 +0000)
Zend/zend_execute_API.c

index 01963e5fe6e647e07e4e7ae9fb363e6b6e7f447e..15569576278f687b7b4a519f719c9a69f00baa01 100644 (file)
@@ -761,6 +761,11 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
                                zval *new_zval;
 
                                if (fci->no_separation) {
+                                       if(i) {
+                                               /* hack to clean up the stack */
+                                               zend_ptr_stack_n_push(&EG(argument_stack), 2, (void *) (long) i, NULL);
+                                               zend_ptr_stack_clear_multiple(TSRMLS_C);
+                                       }
                                        return FAILURE;
                                }
                                ALLOC_ZVAL(new_zval);