From: Nikita Popov Date: Thu, 20 Jun 2019 13:03:44 +0000 (+0200) Subject: SOAP: Avoid indexing into null pointer X-Git-Tag: php-7.4.0alpha2~31 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=27d3373496ec5b2e45bd7403ccde1ab891efe00b;p=php SOAP: Avoid indexing into null pointer --- diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 663f260920..a74aaf7d15 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -4070,7 +4070,8 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function int hdr_use = SOAP_LITERAL; zval *hdr_ret = &h->retval; char *hdr_ns = h->hdr?h->hdr->ns:NULL; - char *hdr_name = Z_STRVAL(h->function_name); + char *hdr_name = Z_TYPE(h->function_name) == IS_STRING + ? Z_STRVAL(h->function_name) : NULL; HashTable *ht = NULL; if (Z_TYPE(h->retval) == IS_OBJECT &&