Skip to content

Commit

Permalink
Fix NULL pointer deref in xmlTextReaderValidateEntity
Browse files Browse the repository at this point in the history
Found by OSS-Fuzz.
  • Loading branch information
nwellnhof committed Jan 6, 2019
1 parent 57a3af5 commit 157cd3a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions xmlreader.c
Original file line number Diff line number Diff line change
Expand Up @@ -1114,11 +1114,11 @@ xmlTextReaderValidateEntity(xmlTextReaderPtr reader) {
continue;
} else {
/*
* The error has probably be raised already.
* The error has probably been raised already.
*/
if (node == oldnode)
break;
node = node->next;
goto skip_children;
}
#ifdef LIBXML_REGEXP_ENABLED
} else if (node->type == XML_ELEMENT_NODE) {
Expand All @@ -1140,6 +1140,7 @@ xmlTextReaderValidateEntity(xmlTextReaderPtr reader) {
} else if (node->type == XML_ELEMENT_NODE) {
xmlTextReaderValidatePop(reader);
}
skip_children:
if (node->next != NULL) {
node = node->next;
continue;
Expand Down

0 comments on commit 157cd3a

Please sign in to comment.