[libxml2] Fix NULL pointer deref in xmlTextReaderValidateEntity
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Fix NULL pointer deref in xmlTextReaderValidateEntity
- Date: Sun, 6 Jan 2019 13:20:07 +0000 (UTC)
commit 157cd3aed70845564e2ecc9754f3f826a3c9c65e
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Sat Nov 24 15:46:00 2018 +0100
Fix NULL pointer deref in xmlTextReaderValidateEntity
Found by OSS-Fuzz.
xmlreader.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/xmlreader.c b/xmlreader.c
index 4461b36a..3acec759 100644
--- a/xmlreader.c
+++ b/xmlreader.c
@@ -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) {
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]