libxml2 r3675 - trunk
- From: veillard svn gnome org
- To: svn-commits-list gnome org
- Subject: libxml2 r3675 - trunk
- Date: Fri, 11 Jan 2008 07:41:40 +0000 (GMT)
Author: veillard
Date: Fri Jan 11 07:41:39 2008
New Revision: 3675
URL: http://svn.gnome.org/viewvc/libxml2?rev=3675&view=rev
Log:
* HTMLparser.c: avoid stopping parsing when encountering
out of range characters in an HTML file, report and
continue processing instead, should fix #472696
Daniel
Modified:
trunk/ChangeLog
trunk/HTMLparser.c
Modified: trunk/HTMLparser.c
==============================================================================
--- trunk/HTMLparser.c (original)
+++ trunk/HTMLparser.c Fri Jan 11 07:41:39 2008
@@ -2772,8 +2772,13 @@
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.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]