1
0
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:
Daniel Veillard
2008-01-11 07:41:39 +00:00
parent 9ebb632238
commit c5b43cc03a
2 changed files with 13 additions and 2 deletions

View File

@ -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

View File

@ -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.