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

Guard new calls to xmlValidatePopElement in xml_reader.c

Closes #154.
This commit is contained in:
Daniel Cheng 2020-04-10 14:52:03 -07:00 committed by Nick Wellnhofer
parent 386fb27654
commit 106757e8c1

View File

@ -2263,8 +2263,10 @@ xmlFreeTextReader(xmlTextReaderPtr reader) {
#ifdef LIBXML_VALID_ENABLED
if ((reader->ctxt->vctxt.vstateTab != NULL) &&
(reader->ctxt->vctxt.vstateMax > 0)){
#ifdef LIBXML_REGEXP_ENABLED
while (reader->ctxt->vctxt.vstateNr > 0)
xmlValidatePopElement(&reader->ctxt->vctxt, NULL, NULL, NULL);
#endif /* LIBXML_REGEXP_ENABLED */
xmlFree(reader->ctxt->vctxt.vstateTab);
reader->ctxt->vctxt.vstateTab = NULL;
reader->ctxt->vctxt.vstateMax = 0;