From 27d3373496ec5b2e45bd7403ccde1ab891efe00b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 20 Jun 2019 15:03:44 +0200 Subject: [PATCH] SOAP: Avoid indexing into null pointer --- ext/soap/soap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 && -- 2.50.1