]> granicus.if.org Git - php/commitdiff
fix: possible crash was fixed
authorDmitry Stogov <dmitry@php.net>
Thu, 12 Feb 2004 16:41:58 +0000 (16:41 +0000)
committerDmitry Stogov <dmitry@php.net>
Thu, 12 Feb 2004 16:41:58 +0000 (16:41 +0000)
ext/soap/soap.c

index 6826c6a7334a642eb2adeee00ef6f8b1af6ea7dd..29cc3e64373ab5a89a1ec049fa8ff6b37c8b4a3d 100644 (file)
@@ -3190,7 +3190,7 @@ static void function_to_string(sdlFunctionPtr function, smart_str *buf)
        if (function->responseParameters && function->responseParameters->pListHead) {
                sdlParamPtr *param;
                param = function->responseParameters->pListHead->pData;
-               if ((*param)->encode->details.type_str) {
+               if ((*param)->encode && (*param)->encode->details.type_str) {
                        smart_str_appendl(buf, (*param)->encode->details.type_str, strlen((*param)->encode->details.type_str));
                        smart_str_appendc(buf, ' ');
                } else {
@@ -3209,7 +3209,7 @@ static void function_to_string(sdlFunctionPtr function, smart_str *buf)
                i = 0;
                zend_hash_internal_pointer_reset_ex(function->requestParameters, &pos);
                while (zend_hash_get_current_data_ex(function->requestParameters, (void **)&param, &pos) != FAILURE) {
-                       if ((*param)->encode->details.type_str) {
+                       if ((*param)->encode && (*param)->encode->details.type_str) {
                                smart_str_appendl(buf, (*param)->encode->details.type_str, strlen((*param)->encode->details.type_str));
                        } else {
                                smart_str_appendl(buf, "mixed ", 6);