diff options
author | Hugh Davenport <hugh@allthethings.co.nz> | 2015-11-03 20:40:49 +0800 |
---|---|---|
committer | Daniel Veillard <veillard@redhat.com> | 2015-11-03 20:40:49 +0800 |
commit | ab2b9a93ff19cedde7befbf2fcc48c6e352b6cbe (patch) | |
tree | e261bc598d9d93aeb06c4568a4c3c7b9b320dc4c | |
parent | 18b8988511b0954272cac4d6c3e6724f9dbf6e0a (diff) | |
download | android_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.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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 |