dmitry Tue May 10 06:20:59 2005 EDT
Modified files:
/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.69&r2=1.70&ty=u
Index: php-src/ext/soap/php_http.c
diff -u php-src/ext/soap/php_http.c:1.69 php-src/ext/soap/php_http.c:1.70
--- php-src/ext/soap/php_http.c:1.69 Tue May 10 04:16:14 2005
+++ php-src/ext/soap/php_http.c Tue May 10 06:20:58 2005
@@ -17,7 +17,7 @@
| Dmitry Stogov <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_http.c,v 1.69 2005/05/10 08:16:14 dmitry Exp $ */
+/* $Id: php_http.c,v 1.70 2005/05/10 10:20:58 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.144&r2=1.145&ty=u
Index: php-src/ext/soap/soap.c
diff -u php-src/ext/soap/soap.c:1.144 php-src/ext/soap/soap.c:1.145
--- php-src/ext/soap/soap.c:1.144 Thu Apr 21 07:16:48 2005
+++ php-src/ext/soap/soap.c Tue May 10 06:20:58 2005
@@ -17,7 +17,7 @@
| Dmitry Stogov <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: soap.c,v 1.144 2005/04/21 11:16:48 dmitry Exp $ */
+/* $Id: soap.c,v 1.145 2005/05/10 10:20:58 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