[libxml2] 614005 Possible erroneous HTML parsing on unterminated script
- From: Daniel Veillard <veillard src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] 614005 Possible erroneous HTML parsing on unterminated script
- Date: Thu, 4 Nov 2010 09:19:34 +0000 (UTC)
commit d4b54471417878a6d06e79e43a4f7afb7ba69fdd
Author: Pierre Belzile <pierre belzile gmail com>
Date: Thu Nov 4 10:18:17 2010 +0100
614005 Possible erroneous HTML parsing on unterminated script
Fix a nasty error handling problem when an error happen at the
end of the input buffer.
HTMLparser.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/HTMLparser.c b/HTMLparser.c
index 04bfbd4..7db6f0c 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -2887,9 +2887,11 @@ htmlParseScript(htmlParserCtxtPtr ctxt) {
}
if ((!(IS_CHAR_CH(cur))) && (!((cur == 0) && (ctxt->progressive)))) {
- htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR,
- "Invalid char in CDATA 0x%X\n", cur);
- NEXT;
+ htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR,
+ "Invalid char in CDATA 0x%X\n", cur);
+ if (ctxt->input->cur < ctxt->input->end) {
+ NEXT;
+ }
}
if ((nbchar != 0) && (ctxt->sax != NULL) && (!ctxt->disableSAX)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]