mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-28 00:21:53 +03:00
avoid stopping parsing when encountering out of range characters in an
* HTMLparser.c: avoid stopping parsing when encountering out of range characters in an HTML file, report and continue processing instead, should fix #472696 Daniel svn path=/trunk/; revision=3675
This commit is contained in:
@ -2772,8 +2772,13 @@ htmlParseCharData(htmlParserCtxtPtr ctxt) {
|
||||
cur = CUR_CHAR(l);
|
||||
while (((cur != '<') || (ctxt->token == '<')) &&
|
||||
((cur != '&') || (ctxt->token == '&')) &&
|
||||
(IS_CHAR(cur))) {
|
||||
COPY_BUF(l,buf,nbchar,cur);
|
||||
(cur != 0)) {
|
||||
if (!(IS_CHAR(cur))) {
|
||||
htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR,
|
||||
"Invalid char in CDATA 0x%X\n", cur);
|
||||
} else {
|
||||
COPY_BUF(l,buf,nbchar,cur);
|
||||
}
|
||||
if (nbchar >= HTML_PARSER_BIG_BUFFER_SIZE) {
|
||||
/*
|
||||
* Ok the segment is to be consumed as chars.
|
||||
|
Reference in New Issue
Block a user