mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +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:
@ -1,3 +1,9 @@
|
||||
Fri Jan 11 15:37:05 CST 2008 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* HTMLparser.c: avoid stopping parsing when encountering
|
||||
out of range characters in an HTML file, report and
|
||||
continue processing instead, should fix #472696
|
||||
|
||||
Fri Jan 11 15:13:35 CST 2008 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* check-relaxng-test-suite2.py check-relaxng-test-suite.py
|
||||
|
@ -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