[libxml2] Fix null deref in xmlreader buffer
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Fix null deref in xmlreader buffer
- Date: Sun, 25 Aug 2019 12:32:54 +0000 (UTC)
commit 0571b4e6073d5afbd0f4682e0486e655e347e0da
Author: zhouzhongyuan <zhouzhongyuan huawei com>
Date: Fri Aug 9 15:39:17 2019 +0800
Fix null deref in xmlreader buffer
xmlreader.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/xmlreader.c b/xmlreader.c
old mode 100644
new mode 100755
index ebf3ca15..d7150710
--- a/xmlreader.c
+++ b/xmlreader.c
@@ -1716,6 +1716,8 @@ xmlTextReaderReadInnerXml(xmlTextReaderPtr reader ATTRIBUTE_UNUSED)
}
doc = reader->node->doc;
buff = xmlBufferCreate();
+ if (buff == NULL)
+ return NULL;
for (cur_node = reader->node->children; cur_node != NULL;
cur_node = cur_node->next) {
/* XXX: Why is the node copied? */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]