dmitry Fri Nov 10 15:05:38 2006 UTC Modified files: /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/ext/soap/php_encoding.c?r1=1.146&r2=1.147&diff_format=u Index: php-src/ext/soap/php_encoding.c diff -u php-src/ext/soap/php_encoding.c:1.146 php-src/ext/soap/php_encoding.c:1.147 --- php-src/ext/soap/php_encoding.c:1.146 Wed Nov 8 10:05:32 2006 +++ php-src/ext/soap/php_encoding.c Fri Nov 10 15:05:38 2006 @@ -17,7 +17,7 @@ | Dmitry Stogov <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: php_encoding.c,v 1.146 2006/11/08 10:05:32 dmitry Exp $ */ +/* $Id: php_encoding.c,v 1.147 2006/11/10 15:05:38 dmitry Exp $ */ #include <time.h> @@ -1992,6 +1992,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; @@ -2040,6 +2041,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); @@ -2050,6 +2052,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); @@ -2070,6 +2073,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); @@ -2227,6 +2231,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; @@ -2248,6 +2253,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) { @@ -2257,6 +2263,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); @@ -2269,6 +2276,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