From 3c939e3f69955d087e0bb671868f7267dfb2a502 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Sun, 31 Jan 2021 21:15:23 -0800 Subject: Fix bug #80672 - Null Dereference in SoapClient --- ext/soap/php_xml.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/soap/php_xml.c') diff --git a/ext/soap/php_xml.c b/ext/soap/php_xml.c index 8d07bb0d83..a1ab525de3 100644 --- a/ext/soap/php_xml.c +++ b/ext/soap/php_xml.c @@ -203,7 +203,7 @@ xmlNsPtr node_find_ns(xmlNodePtr node) int attr_is_equal_ex(xmlAttrPtr node, char *name, char *ns) { - if (name == NULL || strcmp((char*)node->name, name) == 0) { + if (name == NULL || ((node->name) && strcmp((char*)node->name, name) == 0)) { if (ns) { xmlNsPtr nsPtr = attr_find_ns(node); if (nsPtr) { @@ -219,7 +219,7 @@ int attr_is_equal_ex(xmlAttrPtr node, char *name, char *ns) int node_is_equal_ex(xmlNodePtr node, char *name, char *ns) { - if (name == NULL || strcmp((char*)node->name, name) == 0) { + if (name == NULL || ((node->name) && strcmp((char*)node->name, name) == 0)) { if (ns) { xmlNsPtr nsPtr = node_find_ns(node); if (nsPtr) { -- cgit v1.2.1