amigadave / rpms / libxml2

Forked from rpms/libxml2 5 years ago
Clone
7523b3a
From 7a1bd7f6497ac33a9023d556f6f47a48f01deac0 Mon Sep 17 00:00:00 2001
7523b3a
From: Nick Wellnhofer <wellnhofer@aevum.de>
7523b3a
Date: Sat, 17 Mar 2018 00:03:24 +0100
06a8f6b
Subject: [PATCH 02/13] Revert "Change calls to xmlCharEncInput to set flush
06a8f6b
 false"
7523b3a
7523b3a
This reverts commit 6e6ae5daa6cd9640c9a83c1070896273e9b30d14 which
7523b3a
broke decoding of larger documents with ICU.
7523b3a
7523b3a
See https://bugs.chromium.org/p/chromium/issues/detail?id=820163
7523b3a
---
7523b3a
 HTMLparser.c      | 2 +-
7523b3a
 parserInternals.c | 2 +-
7523b3a
 xmlIO.c           | 4 ++--
7523b3a
 3 files changed, 4 insertions(+), 4 deletions(-)
7523b3a
7523b3a
diff --git a/HTMLparser.c b/HTMLparser.c
7523b3a
index 9adeb174..7e243e60 100644
7523b3a
--- a/HTMLparser.c
7523b3a
+++ b/HTMLparser.c
7523b3a
@@ -3635,7 +3635,7 @@ htmlCheckEncodingDirect(htmlParserCtxtPtr ctxt, const xmlChar *encoding) {
7523b3a
 	     */
7523b3a
 	    processed = ctxt->input->cur - ctxt->input->base;
7523b3a
 	    xmlBufShrink(ctxt->input->buf->buffer, processed);
7523b3a
-	    nbchars = xmlCharEncInput(ctxt->input->buf, 0);
7523b3a
+	    nbchars = xmlCharEncInput(ctxt->input->buf, 1);
7523b3a
 	    if (nbchars < 0) {
7523b3a
 		htmlParseErr(ctxt, XML_ERR_INVALID_ENCODING,
7523b3a
 		             "htmlCheckEncoding: encoder error\n",
7523b3a
diff --git a/parserInternals.c b/parserInternals.c
7523b3a
index 8c0cd57a..09876ab4 100644
7523b3a
--- a/parserInternals.c
7523b3a
+++ b/parserInternals.c
7523b3a
@@ -1214,7 +1214,7 @@ xmlSwitchInputEncodingInt(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
7523b3a
                 /*
7523b3a
                  * convert as much as possible of the buffer
7523b3a
                  */
7523b3a
-                nbchars = xmlCharEncInput(input->buf, 0);
7523b3a
+                nbchars = xmlCharEncInput(input->buf, 1);
7523b3a
             } else {
7523b3a
                 /*
7523b3a
                  * convert just enough to get
7523b3a
diff --git a/xmlIO.c b/xmlIO.c
7523b3a
index 82543477..f61dd05a 100644
7523b3a
--- a/xmlIO.c
7523b3a
+++ b/xmlIO.c
7523b3a
@@ -3157,7 +3157,7 @@ xmlParserInputBufferPush(xmlParserInputBufferPtr in,
7523b3a
 	 * convert as much as possible to the parser reading buffer.
7523b3a
 	 */
7523b3a
 	use = xmlBufUse(in->raw);
7523b3a
-	nbchars = xmlCharEncInput(in, 0);
7523b3a
+	nbchars = xmlCharEncInput(in, 1);
7523b3a
 	if (nbchars < 0) {
7523b3a
 	    xmlIOErr(XML_IO_ENCODER, NULL);
7523b3a
 	    in->error = XML_IO_ENCODER;
7523b3a
@@ -3273,7 +3273,7 @@ xmlParserInputBufferGrow(xmlParserInputBufferPtr in, int len) {
7523b3a
 	 * convert as much as possible to the parser reading buffer.
7523b3a
 	 */
7523b3a
 	use = xmlBufUse(in->raw);
7523b3a
-	nbchars = xmlCharEncInput(in, 0);
7523b3a
+	nbchars = xmlCharEncInput(in, 1);
7523b3a
 	if (nbchars < 0) {
7523b3a
 	    xmlIOErr(XML_IO_ENCODER, NULL);
7523b3a
 	    in->error = XML_IO_ENCODER;
7523b3a
-- 
06a8f6b
2.18.0
7523b3a