summaryrefslogtreecommitdiff
path: root/ext/soap/php_xml.c
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2021-02-01 00:17:02 -0800
committerStanislav Malyshev <stas@php.net>2021-02-01 00:17:02 -0800
commitf2994786f3d5f01944202d8757bf3f6ff92a8261 (patch)
tree3fa75f0c9ee033bc1ef5327bcaeee1d6453416be /ext/soap/php_xml.c
parent042e0d89bd81e7d48c005eb62d21dd2b03171448 (diff)
parentd94d0dda297ebc2f7afe0add2a6f85ddd057b4ee (diff)
downloadphp-git-f2994786f3d5f01944202d8757bf3f6ff92a8261.tar.gz
Merge branch 'PHP-8.0'
* PHP-8.0: Fix bug #80672 - Null Dereference in SoapClient
Diffstat (limited to 'ext/soap/php_xml.c')
-rw-r--r--ext/soap/php_xml.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/soap/php_xml.c b/ext/soap/php_xml.c
index d5faa53694..bc6a6a1638 100644
--- a/ext/soap/php_xml.c
+++ b/ext/soap/php_xml.c
@@ -197,7 +197,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) {
@@ -213,7 +213,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) {