1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

614005 Possible erroneous HTML parsing on unterminated script

Fix a nasty error handling problem when an error happen at the
end of the input buffer.
This commit is contained in:
Pierre Belzile
2010-11-04 10:18:17 +01:00
committed by Daniel Veillard
parent 37072b753b
commit d4b5447141

View File

@ -2889,8 +2889,10 @@ htmlParseScript(htmlParserCtxtPtr ctxt) {
if ((!(IS_CHAR_CH(cur))) && (!((cur == 0) && (ctxt->progressive)))) {
htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR,
"Invalid char in CDATA 0x%X\n", cur);
if (ctxt->input->cur < ctxt->input->end) {
NEXT;
}
}
if ((nbchar != 0) && (ctxt->sax != NULL) && (!ctxt->disableSAX)) {
if (ctxt->sax->cdataBlock!= NULL) {