diff --git a/parser.c b/parser.c index 8a19cde3..43d0c688 100644 --- a/parser.c +++ b/parser.c @@ -6729,6 +6729,9 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) { ctxt->disableSAX = state; ctxt->instate = instate; + if (RAW == 0) { + xmlFatalErr(ctxt, XML_ERR_CONDSEC_NOT_FINISHED, NULL); + } if (ctxt->input->id != id) { xmlFatalErrMsg(ctxt, XML_ERR_ENTITY_BOUNDARY, "All markup of the conditional section is" @@ -6769,10 +6772,6 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) { GROW; } - if (RAW == 0) { - xmlFatalErr(ctxt, XML_ERR_CONDSEC_NOT_FINISHED, NULL); - } - error: xmlFree(inputIds); }