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.
diff --git a/HTMLparser.c b/HTMLparser.c
index 04bfbd4..7db6f0c 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -2887,9 +2887,11 @@
     }
 
     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)) {