Skip to content

Commit 27d3373

Browse files
committed
SOAP: Avoid indexing into null pointer
1 parent f127d77 commit 27d3373

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/soap/soap.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4070,7 +4070,8 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function
40704070
int hdr_use = SOAP_LITERAL;
40714071
zval *hdr_ret = &h->retval;
40724072
char *hdr_ns = h->hdr?h->hdr->ns:NULL;
4073-
char *hdr_name = Z_STRVAL(h->function_name);
4073+
char *hdr_name = Z_TYPE(h->function_name) == IS_STRING
4074+
? Z_STRVAL(h->function_name) : NULL;
40744075
HashTable *ht = NULL;
40754076

40764077
if (Z_TYPE(h->retval) == IS_OBJECT &&

0 commit comments

Comments
 (0)