[libxml2] Guard new calls to xmlValidatePopElement in xml_reader.c



commit 106757e8c1e26ad9b8c924c7f304074b79e082c5
Author: Daniel Cheng <dcheng google com>
Date:   Fri Apr 10 14:52:03 2020 -0700

    Guard new calls to xmlValidatePopElement in xml_reader.c
    
    Closes #154.

 xmlreader.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/xmlreader.c b/xmlreader.c
index e39d0388..3fd9aa4c 100644
--- a/xmlreader.c
+++ b/xmlreader.c
@@ -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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]