From 86bef09787e43dea58515284a7c9f4a808a5d311 Mon Sep 17 00:00:00 2001 From: Marcelo Roberto Jimenez Date: Mon, 12 Mar 2012 11:48:21 -0300 Subject: [PATCH] SF Bug Tracker id 3175217 - Crash bug in Parser_addNamespace() This is a fix to commit 2fb791c9bbab69bcb39153a663b8da95ae44a9c0. --- ixml/src/ixmlparser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ixml/src/ixmlparser.c b/ixml/src/ixmlparser.c index aa338e3..baf8485 100644 --- a/ixml/src/ixmlparser.c +++ b/ixml/src/ixmlparser.c @@ -1517,8 +1517,8 @@ static int Parser_addNamespace( } xmlParser->pNeedPrefixNode = NULL; } else { - if ((strcmp(pNode->nodeName, pCur->element) != 0) && - pCur->prefix && + if (pCur->prefix && + (strcmp(pNode->nodeName, pCur->element) != 0) && (strcmp(pNode->prefix, pCur->prefix) != 0)) return IXML_FAILED; namespaceUri = Parser_getNameSpace(xmlParser, pCur->prefix);