summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Hockey <joel.hockey@gmail.com>2018-01-02 21:47:35 -0800
committerNick Wellnhofer <wellnhofer@aevum.de>2018-01-08 19:57:53 +0100
commit6e6ae5daa6cd9640c9a83c1070896273e9b30d14 (patch)
treeba8a523e3d7b0d95e272228b1ea956974a47863e
parent1637d612d15318496804d59fc92594d732c5258a (diff)
downloadlibxml2-6e6ae5daa6cd9640c9a83c1070896273e9b30d14.tar.gz
Change calls to xmlCharEncInput to set flush false when not final call. Having flush incorrectly set to true causes errors for ICU.
-rw-r--r--HTMLparser.c2
-rw-r--r--parserInternals.c2
-rw-r--r--xmlIO.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/HTMLparser.c b/HTMLparser.c
index 7e243e60..9adeb174 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -3635,7 +3635,7 @@ htmlCheckEncodingDirect(htmlParserCtxtPtr ctxt, const xmlChar *encoding) {
*/
processed = ctxt->input->cur - ctxt->input->base;
xmlBufShrink(ctxt->input->buf->buffer, processed);
- nbchars = xmlCharEncInput(ctxt->input->buf, 1);
+ nbchars = xmlCharEncInput(ctxt->input->buf, 0);
if (nbchars < 0) {
htmlParseErr(ctxt, XML_ERR_INVALID_ENCODING,
"htmlCheckEncoding: encoder error\n",
diff --git a/parserInternals.c b/parserInternals.c
index 09876ab4..8c0cd57a 100644
--- a/parserInternals.c
+++ b/parserInternals.c
@@ -1214,7 +1214,7 @@ xmlSwitchInputEncodingInt(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
/*
* convert as much as possible of the buffer
*/
- nbchars = xmlCharEncInput(input->buf, 1);
+ nbchars = xmlCharEncInput(input->buf, 0);
} else {
/*
* convert just enough to get
diff --git a/xmlIO.c b/xmlIO.c
index f61dd05a..82543477 100644
--- a/xmlIO.c
+++ b/xmlIO.c
@@ -3157,7 +3157,7 @@ xmlParserInputBufferPush(xmlParserInputBufferPtr in,
* convert as much as possible to the parser reading buffer.
*/
use = xmlBufUse(in->raw);
- nbchars = xmlCharEncInput(in, 1);
+ nbchars = xmlCharEncInput(in, 0);
if (nbchars < 0) {
xmlIOErr(XML_IO_ENCODER, NULL);
in->error = XML_IO_ENCODER;
@@ -3273,7 +3273,7 @@ xmlParserInputBufferGrow(xmlParserInputBufferPtr in, int len) {
* convert as much as possible to the parser reading buffer.
*/
use = xmlBufUse(in->raw);
- nbchars = xmlCharEncInput(in, 1);
+ nbchars = xmlCharEncInput(in, 0);
if (nbchars < 0) {
xmlIOErr(XML_IO_ENCODER, NULL);
in->error = XML_IO_ENCODER;