mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-26 00:37:43 +03:00
html: Abort earlier on fatal errors
This commit is contained in:
@@ -3134,7 +3134,8 @@ htmlParseCharDataInternal(htmlParserCtxtPtr ctxt, int readahead) {
|
|||||||
cur = CUR_CHAR(l);
|
cur = CUR_CHAR(l);
|
||||||
while (((cur != '<') || (ctxt->token == '<')) &&
|
while (((cur != '<') || (ctxt->token == '<')) &&
|
||||||
((cur != '&') || (ctxt->token == '&')) &&
|
((cur != '&') || (ctxt->token == '&')) &&
|
||||||
(cur != 0)) {
|
(cur != 0) &&
|
||||||
|
(!PARSER_STOPPED(ctxt))) {
|
||||||
if (!(IS_CHAR(cur))) {
|
if (!(IS_CHAR(cur))) {
|
||||||
htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR,
|
htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR,
|
||||||
"Invalid char in CDATA 0x%X\n", cur);
|
"Invalid char in CDATA 0x%X\n", cur);
|
||||||
@@ -4186,7 +4187,7 @@ htmlParseContent(htmlParserCtxtPtr ctxt) {
|
|||||||
|
|
||||||
currentNode = xmlStrdup(ctxt->name);
|
currentNode = xmlStrdup(ctxt->name);
|
||||||
depth = ctxt->nameNr;
|
depth = ctxt->nameNr;
|
||||||
while (1) {
|
while (!PARSER_STOPPED(ctxt)) {
|
||||||
GROW;
|
GROW;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user