dmitry          Tue May 10 06:20:39 2005 EDT

  Modified files:              (Branch: PHP_5_0)
    /php-src/ext/soap   php_http.c soap.c 
  Log:
  Fixed SIGSEGV
  
  
http://cvs.php.net/diff.php/php-src/ext/soap/php_http.c?r1=1.55.2.15&r2=1.55.2.16&ty=u
Index: php-src/ext/soap/php_http.c
diff -u php-src/ext/soap/php_http.c:1.55.2.15 
php-src/ext/soap/php_http.c:1.55.2.16
--- php-src/ext/soap/php_http.c:1.55.2.15       Tue May 10 04:15:58 2005
+++ php-src/ext/soap/php_http.c Tue May 10 06:20:38 2005
@@ -17,7 +17,7 @@
   |          Dmitry Stogov <[EMAIL PROTECTED]>                             |
   +----------------------------------------------------------------------+
 */
-/* $Id: php_http.c,v 1.55.2.15 2005/05/10 08:15:58 dmitry Exp $ */
+/* $Id: php_http.c,v 1.55.2.16 2005/05/10 10:20:38 dmitry Exp $ */
 
 #include "php_soap.h"
 #include "ext/standard/base64.h"
@@ -665,7 +665,7 @@
 
        do {
                if (!get_http_headers(stream, &http_headers, &http_header_size 
TSRMLS_CC)) {
-                       efree(http_headers);
+                       if (http_headers) {efree(http_headers);}
                        if (request != buf) {efree(request);}
                        php_stream_close(stream);
                        zend_hash_del(Z_OBJPROP_P(this_ptr), "httpsocket", 
sizeof("httpsocket"));
http://cvs.php.net/diff.php/php-src/ext/soap/soap.c?r1=1.110.2.32&r2=1.110.2.33&ty=u
Index: php-src/ext/soap/soap.c
diff -u php-src/ext/soap/soap.c:1.110.2.32 php-src/ext/soap/soap.c:1.110.2.33
--- php-src/ext/soap/soap.c:1.110.2.32  Thu Apr 21 08:27:54 2005
+++ php-src/ext/soap/soap.c     Tue May 10 06:20:38 2005
@@ -17,7 +17,7 @@
   |          Dmitry Stogov <[EMAIL PROTECTED]>                             |
   +----------------------------------------------------------------------+
 */
-/* $Id: soap.c,v 1.110.2.32 2005/04/21 12:27:54 dmitry Exp $ */
+/* $Id: soap.c,v 1.110.2.33 2005/05/10 10:20:38 dmitry Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -92,6 +92,9 @@
        char* _old_error_code = SOAP_GLOBAL(error_code);\
        zval* _old_error_object = SOAP_GLOBAL(error_object);\
        int _old_soap_version = SOAP_GLOBAL(soap_version);\
+       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); \
        int _bailout = 0;\
        SOAP_GLOBAL(use_soap_error_handler) = 1;\
        SOAP_GLOBAL(error_code) = "Client";\
@@ -100,6 +103,9 @@
 
 #define SOAP_CLIENT_END_CODE() \
        } zend_catch {\
+               CG(in_compilation) = _old_in_compilation; \
+               EG(in_execution) = _old_in_execution; \
+               EG(current_execute_data) = _old_current_execute_data; \
                if (EG(exception) == NULL || \
                    Z_TYPE_P(EG(exception)) != IS_OBJECT || \
                    Z_OBJCE_P(EG(exception)) != soap_fault_class_entry) {\
@@ -1837,6 +1843,9 @@
 static void soap_error_handler(int error_num, const char *error_filename, 
const uint error_lineno, const char *format, va_list args)
 {
        TSRMLS_FETCH();
+       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);
 
        if (!SOAP_GLOBAL(use_soap_error_handler)) {
                old_error_handler(error_num, error_filename, error_lineno, 
format, args);
@@ -1886,6 +1895,9 @@
                        zend_try {
                                old_error_handler(error_num, error_filename, 
error_lineno, format, args);
                        } zend_catch {
+                               CG(in_compilation) = _old_in_compilation;
+                               EG(in_execution) = _old_in_execution;
+                               EG(current_execute_data) = 
_old_current_execute_data;
                        } zend_end_try();
                        PG(display_errors) = old;
                        zend_bailout();
@@ -1939,6 +1951,9 @@
                zend_try {
                        old_error_handler(error_num, error_filename, 
error_lineno, format, args);
                } zend_catch {
+                       CG(in_compilation) = _old_in_compilation;
+                       EG(in_execution) = _old_in_execution;
+                       EG(current_execute_data) = _old_current_execute_data;
                } zend_end_try();
                PG(display_errors) = old;
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to