diff options
author | Ondřej Surý <ondrej@sury.org> | 2012-01-11 15:43:42 +0100 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2012-01-11 15:43:42 +0100 |
commit | 8f1428d29ef91d74b4d272af171675f2971eb15b (patch) | |
tree | a1f4f4d7dc5bfe8096806dd5c5266634e19fa07a /ext/soap/soap.c | |
parent | c6e4182351e0173fe58de141e143aac2eacf5efe (diff) | |
download | php-8f1428d29ef91d74b4d272af171675f2971eb15b.tar.gz |
Imported Upstream version 5.3.9upstream/5.3.9
Diffstat (limited to 'ext/soap/soap.c')
-rw-r--r-- | ext/soap/soap.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/ext/soap/soap.c b/ext/soap/soap.c index d1660dc04..1639c7177 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: soap.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: soap.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -99,6 +99,7 @@ static void soap_error_handler(int error_num, const char *error_filename, const zend_bool _old_in_compilation = CG(in_compilation); \ zend_bool _old_in_execution = EG(in_execution); \ zend_execute_data *_old_current_execute_data = EG(current_execute_data); \ + void **_old_stack_top = EG(argument_stack)->top; \ int _bailout = 0;\ SOAP_GLOBAL(use_soap_error_handler) = 1;\ SOAP_GLOBAL(error_code) = "Client";\ @@ -115,6 +116,16 @@ static void soap_error_handler(int error_num, const char *error_filename, const !instanceof_function(Z_OBJCE_P(EG(exception)), soap_fault_class_entry TSRMLS_CC)) {\ _bailout = 1;\ }\ + if (_old_stack_top != EG(argument_stack)->top) { \ + while (EG(argument_stack)->prev != NULL && \ + ((char*)_old_stack_top < (char*)EG(argument_stack) || \ + (char*) _old_stack_top > (char*)EG(argument_stack)->end)) { \ + zend_vm_stack tmp = EG(argument_stack)->prev; \ + efree(EG(argument_stack)); \ + EG(argument_stack) = tmp; \ + } \ + EG(argument_stack)->top = _old_stack_top; \ + } \ } zend_end_try();\ SOAP_GLOBAL(use_soap_error_handler) = _old_handler;\ SOAP_GLOBAL(error_code) = _old_error_code;\ |