dmitry          Fri Nov 10 15:05:23 2006 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src    NEWS 
    /php-src/ext/soap   php_encoding.c 
  Log:
  Fixed bug #39454 (Returning a SOAP array segfaults PHP)
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.354&r2=1.2027.2.547.2.355&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.354 php-src/NEWS:1.2027.2.547.2.355
--- php-src/NEWS:1.2027.2.547.2.354     Fri Nov 10 15:04:07 2006
+++ php-src/NEWS        Fri Nov 10 15:05:22 2006
@@ -34,6 +34,7 @@
     php_filter.h).
 - Fixed wrong signature initialization in imagepng (Takeshi Abe)
 - Added optimization for imageline with horizontal and vertial lines (Pierre)
+- Fixed bug #39454 (Returning a SOAP array segfaults PHP). (Dmitry)
 - Fixed bug #39414 (Syntax error while compiling with Sun Workshop Complier).
   (Johannes)
 - Fixed bug #39398 (Booleans are not automatically translated to integers).
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_encoding.c?r1=1.103.2.21.2.15&r2=1.103.2.21.2.16&diff_format=u
Index: php-src/ext/soap/php_encoding.c
diff -u php-src/ext/soap/php_encoding.c:1.103.2.21.2.15 
php-src/ext/soap/php_encoding.c:1.103.2.21.2.16
--- php-src/ext/soap/php_encoding.c:1.103.2.21.2.15     Wed Nov  8 10:05:19 2006
+++ php-src/ext/soap/php_encoding.c     Fri Nov 10 15:05:22 2006
@@ -17,7 +17,7 @@
   |          Dmitry Stogov <[EMAIL PROTECTED]>                             |
   +----------------------------------------------------------------------+
 */
-/* $Id: php_encoding.c,v 1.103.2.21.2.15 2006/11/08 10:05:19 dmitry Exp $ */
+/* $Id: php_encoding.c,v 1.103.2.21.2.16 2006/11/10 15:05:22 dmitry Exp $ */
 
 #include <time.h>
 
@@ -2023,6 +2023,7 @@
                    zend_hash_find(sdl_type->attributes, 
SOAP_1_1_ENC_NAMESPACE":arrayType",
                      sizeof(SOAP_1_1_ENC_NAMESPACE":arrayType"),
                      (void **)&arrayType) == SUCCESS &&
+                   (*arrayType)->extraAttributes &&
                    zend_hash_find((*arrayType)->extraAttributes, 
WSDL_NAMESPACE":arrayType", sizeof(WSDL_NAMESPACE":arrayType"), (void **)&ext) 
== SUCCESS) {
 
                        char *value, *end;
@@ -2071,6 +2072,7 @@
                           zend_hash_find(sdl_type->attributes, 
SOAP_1_2_ENC_NAMESPACE":itemType",
                             sizeof(SOAP_1_2_ENC_NAMESPACE":itemType"),
                             (void **)&arrayType) == SUCCESS &&
+                          (*arrayType)->extraAttributes &&
                           zend_hash_find((*arrayType)->extraAttributes, 
WSDL_NAMESPACE":itemType", sizeof(WSDL_NAMESPACE":itemType"), (void **)&ext) == 
SUCCESS) {
                        if ((*ext)->ns != NULL) {
                                enc = get_encoder(SOAP_GLOBAL(sdl), (*ext)->ns, 
(*ext)->val);
@@ -2081,6 +2083,7 @@
                        if (zend_hash_find(sdl_type->attributes, 
SOAP_1_2_ENC_NAMESPACE":arraySize",
                                           
sizeof(SOAP_1_2_ENC_NAMESPACE":arraySize"),
                                           (void **)&arrayType) == SUCCESS &&
+                           (*arrayType)->extraAttributes &&
                            zend_hash_find((*arrayType)->extraAttributes, 
WSDL_NAMESPACE":arraySize", sizeof(WSDL_NAMESPACE":arraysize"), (void **)&ext) 
== SUCCESS) {
                                dimension = calc_dimension_12((*ext)->val);
                                dims = get_position_12(dimension, (*ext)->val);
@@ -2101,6 +2104,7 @@
                           zend_hash_find(sdl_type->attributes, 
SOAP_1_2_ENC_NAMESPACE":arraySize",
                             sizeof(SOAP_1_2_ENC_NAMESPACE":arraySize"),
                             (void **)&arrayType) == SUCCESS &&
+                          (*arrayType)->extraAttributes &&
                           zend_hash_find((*arrayType)->extraAttributes, 
WSDL_NAMESPACE":arraySize", sizeof(WSDL_NAMESPACE":arraySize"), (void **)&ext) 
== SUCCESS) {
                        dimension = calc_dimension_12((*ext)->val);
                        dims = get_position_12(dimension, (*ext)->val);
@@ -2258,6 +2262,7 @@
                   zend_hash_find(type->sdl_type->attributes, 
SOAP_1_1_ENC_NAMESPACE":arrayType",
                                  sizeof(SOAP_1_1_ENC_NAMESPACE":arrayType"),
                                  (void **)&arrayType) == SUCCESS &&
+                  (*arrayType)->extraAttributes &&
                   zend_hash_find((*arrayType)->extraAttributes, 
WSDL_NAMESPACE":arrayType", sizeof(WSDL_NAMESPACE":arrayType"), (void **)&ext) 
== SUCCESS) {
                char *type, *end;
 
@@ -2279,6 +2284,7 @@
                   zend_hash_find(type->sdl_type->attributes, 
SOAP_1_2_ENC_NAMESPACE":itemType",
                                  sizeof(SOAP_1_2_ENC_NAMESPACE":itemType"),
                                  (void **)&arrayType) == SUCCESS &&
+                  (*arrayType)->extraAttributes &&
                   zend_hash_find((*arrayType)->extraAttributes, 
WSDL_NAMESPACE":itemType", sizeof(WSDL_NAMESPACE":itemType"), (void **)&ext) == 
SUCCESS) {
 
                if ((*ext)->ns != NULL) {
@@ -2288,6 +2294,7 @@
                if (zend_hash_find(type->sdl_type->attributes, 
SOAP_1_2_ENC_NAMESPACE":arraySize",
                                   sizeof(SOAP_1_2_ENC_NAMESPACE":arraySize"),
                                   (void **)&arrayType) == SUCCESS &&
+                   (*arrayType)->extraAttributes &&
                    zend_hash_find((*arrayType)->extraAttributes, 
WSDL_NAMESPACE":arraySize", sizeof(WSDL_NAMESPACE":arraysize"), (void **)&ext) 
== SUCCESS) {
                        dimension = calc_dimension_12((*ext)->val);
                        dims = get_position_12(dimension, (*ext)->val);
@@ -2300,6 +2307,7 @@
                   zend_hash_find(type->sdl_type->attributes, 
SOAP_1_2_ENC_NAMESPACE":arraySize",
                                  sizeof(SOAP_1_2_ENC_NAMESPACE":arraySize"),
                                  (void **)&arrayType) == SUCCESS &&
+                  (*arrayType)->extraAttributes &&
                   zend_hash_find((*arrayType)->extraAttributes, 
WSDL_NAMESPACE":arraySize", sizeof(WSDL_NAMESPACE":arraysize"), (void **)&ext) 
== SUCCESS) {
 
                dimension = calc_dimension_12((*ext)->val);

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

Reply via email to