1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-20 18:50:08 +03:00

Fix null deref in xmlreader buffer

This commit is contained in:
zhouzhongyuan 2019-08-09 15:39:17 +08:00 committed by Nick Wellnhofer
parent ea695ac0d6
commit 0571b4e607

2
xmlreader.c Normal file → Executable file
View File

@ -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? */