Avoid access violation in assertion.

xmlParser->pCurElement was dereferenced before null check.
Affects debug build only.
This commit is contained in:
Yoichi NAKAYAMA 2012-03-07 22:41:42 +09:00
parent cec9d55c4c
commit 71ab707e81
2 changed files with 10 additions and 3 deletions

View File

@ -2,6 +2,13 @@
Version 1.6.16
*******************************************************************************
2012-03-07 Yoichi NAKAYAMA <yoichi.nakayama(at)gmail.com>
Avoid access violation in assertion.
xmlParser->pCurElement was dereferenced before null check.
Affects debug build only.
2012-03-07 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
Remove SIZEOF_MISTACH error in notify_send_and_recv

View File

@ -2254,14 +2254,14 @@ static int Parser_isValidEndElement(
IXML_Node *newNode)
{
assert(xmlParser);
assert(xmlParser->pCurElement->element);
assert(newNode);
assert(newNode->nodeName);
if (xmlParser->pCurElement == NULL) {
return 0;
}
assert(xmlParser->pCurElement->element);
assert(newNode);
assert(newNode->nodeName);
return strcmp(xmlParser->pCurElement->element, newNode->nodeName) == 0;
}