mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-04-25 22:50:08 +03:00
Fix for conditional sections at end of document
Parsing conditional sections would fail if the final ']]>' was at the end of the document. Short-lived regression caused by commit c51e38cb.
This commit is contained in:
parent
d188eb921a
commit
c1035664f9
7
parser.c
7
parser.c
@ -6729,6 +6729,9 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
|
|||||||
ctxt->disableSAX = state;
|
ctxt->disableSAX = state;
|
||||||
ctxt->instate = instate;
|
ctxt->instate = instate;
|
||||||
|
|
||||||
|
if (RAW == 0) {
|
||||||
|
xmlFatalErr(ctxt, XML_ERR_CONDSEC_NOT_FINISHED, NULL);
|
||||||
|
}
|
||||||
if (ctxt->input->id != id) {
|
if (ctxt->input->id != id) {
|
||||||
xmlFatalErrMsg(ctxt, XML_ERR_ENTITY_BOUNDARY,
|
xmlFatalErrMsg(ctxt, XML_ERR_ENTITY_BOUNDARY,
|
||||||
"All markup of the conditional section is"
|
"All markup of the conditional section is"
|
||||||
@ -6769,10 +6772,6 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
|
|||||||
GROW;
|
GROW;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (RAW == 0) {
|
|
||||||
xmlFatalErr(ctxt, XML_ERR_CONDSEC_NOT_FINISHED, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
error:
|
error:
|
||||||
xmlFree(inputIds);
|
xmlFree(inputIds);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user