SF Bug Tracker id 3175217 - Crash bug in Parser_addNamespace()

This is a fix to commit 2fb791c9bb.
This commit is contained in:
Marcelo Roberto Jimenez 2012-03-12 11:48:21 -03:00
parent c40d2bc0c9
commit 86bef09787

View File

@ -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);