aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugh Davenport <hugh@allthethings.co.nz>2015-11-03 20:40:49 +0800
committerDaniel Veillard <veillard@redhat.com>2015-11-03 20:40:49 +0800
commitab2b9a93ff19cedde7befbf2fcc48c6e352b6cbe (patch)
treee261bc598d9d93aeb06c4568a4c3c7b9b320dc4c
parent18b8988511b0954272cac4d6c3e6724f9dbf6e0a (diff)
downloadandroid_external_libxml2-ab2b9a93ff19cedde7befbf2fcc48c6e352b6cbe.tar.gz
android_external_libxml2-ab2b9a93ff19cedde7befbf2fcc48c6e352b6cbe.tar.bz2
android_external_libxml2-ab2b9a93ff19cedde7befbf2fcc48c6e352b6cbe.zip
Avoid extra processing of MarkupDecl when EOF
For https://bugzilla.gnome.org/show_bug.cgi?id=756263 One place where ctxt->instate == XML_PARSER_EOF whic was set up by entity detection issues doesn't get noticed, and even overrided
-rw-r--r--parser.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/parser.c b/parser.c
index d67b3003..134afe70 100644
--- a/parser.c
+++ b/parser.c
@@ -6972,6 +6972,14 @@ xmlParseMarkupDecl(xmlParserCtxtPtr ctxt) {
xmlParsePI(ctxt);
}
}
+
+ /*
+ * detect requirement to exit there and act accordingly
+ * and avoid having instate overriden later on
+ */
+ if (ctxt->instate == XML_PARSER_EOF)
+ return;
+
/*
* This is only for internal subset. On external entities,
* the replacement is done before parsing stage