summaryrefslogtreecommitdiff
path: root/ext/soap/php_xml.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2004-01-29 06:37:51 +0000
committerDmitry Stogov <dmitry@php.net>2004-01-29 06:37:51 +0000
commitc7cfe9f8e3f0b1595a982ef3f7df06f37da971ce (patch)
treefd209e965b5e3ad19fb0c3cc359e64b830abd9e3 /ext/soap/php_xml.c
parent194509f0932b5776632f310dabd6215fd084e1eb (diff)
downloadphp-git-c7cfe9f8e3f0b1595a982ef3f7df06f37da971ce.tar.gz
fix: possible crash was fixed
Diffstat (limited to 'ext/soap/php_xml.c')
-rw-r--r--ext/soap/php_xml.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/ext/soap/php_xml.c b/ext/soap/php_xml.c
index 0962656a27..2040cb04e8 100644
--- a/ext/soap/php_xml.c
+++ b/ext/soap/php_xml.c
@@ -52,7 +52,11 @@ int attr_is_equal_ex(xmlAttrPtr node, char *name, char *ns)
if (name == NULL || strcmp(node->name, name) == 0) {
if (ns) {
xmlNsPtr nsPtr = attr_find_ns(node);
- return (strcmp(nsPtr->href, ns) == 0);
+ if (nsPtr) {
+ return (strcmp(nsPtr->href, ns) == 0);
+ } else {
+ return FALSE;
+ }
}
return TRUE;
}
@@ -64,7 +68,11 @@ int node_is_equal_ex(xmlNodePtr node, char *name, char *ns)
if (name == NULL || strcmp(node->name, name) == 0) {
if (ns) {
xmlNsPtr nsPtr = node_find_ns(node);
- return (strcmp(nsPtr->href, ns) == 0);
+ if (nsPtr) {
+ return (strcmp(nsPtr->href, ns) == 0);
+ } else {
+ return FALSE;
+ }
}
return TRUE;
}