1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-26 00:37:43 +03:00

Revert "Change calls to xmlCharEncInput to set flush false"

This reverts commit 6e6ae5daa6 which
broke decoding of larger documents with ICU.

See https://bugs.chromium.org/p/chromium/issues/detail?id=820163
This commit is contained in:
Nick Wellnhofer
2018-03-17 00:03:24 +01:00
parent 7abec67147
commit 7a1bd7f649
3 changed files with 4 additions and 4 deletions

View File

@@ -3635,7 +3635,7 @@ htmlCheckEncodingDirect(htmlParserCtxtPtr ctxt, const xmlChar *encoding) {
*/ */
processed = ctxt->input->cur - ctxt->input->base; processed = ctxt->input->cur - ctxt->input->base;
xmlBufShrink(ctxt->input->buf->buffer, processed); xmlBufShrink(ctxt->input->buf->buffer, processed);
nbchars = xmlCharEncInput(ctxt->input->buf, 0); nbchars = xmlCharEncInput(ctxt->input->buf, 1);
if (nbchars < 0) { if (nbchars < 0) {
htmlParseErr(ctxt, XML_ERR_INVALID_ENCODING, htmlParseErr(ctxt, XML_ERR_INVALID_ENCODING,
"htmlCheckEncoding: encoder error\n", "htmlCheckEncoding: encoder error\n",

View File

@@ -1214,7 +1214,7 @@ xmlSwitchInputEncodingInt(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
/* /*
* convert as much as possible of the buffer * convert as much as possible of the buffer
*/ */
nbchars = xmlCharEncInput(input->buf, 0); nbchars = xmlCharEncInput(input->buf, 1);
} else { } else {
/* /*
* convert just enough to get * convert just enough to get

View File

@@ -3157,7 +3157,7 @@ xmlParserInputBufferPush(xmlParserInputBufferPtr in,
* convert as much as possible to the parser reading buffer. * convert as much as possible to the parser reading buffer.
*/ */
use = xmlBufUse(in->raw); use = xmlBufUse(in->raw);
nbchars = xmlCharEncInput(in, 0); nbchars = xmlCharEncInput(in, 1);
if (nbchars < 0) { if (nbchars < 0) {
xmlIOErr(XML_IO_ENCODER, NULL); xmlIOErr(XML_IO_ENCODER, NULL);
in->error = XML_IO_ENCODER; in->error = XML_IO_ENCODER;
@@ -3273,7 +3273,7 @@ xmlParserInputBufferGrow(xmlParserInputBufferPtr in, int len) {
* convert as much as possible to the parser reading buffer. * convert as much as possible to the parser reading buffer.
*/ */
use = xmlBufUse(in->raw); use = xmlBufUse(in->raw);
nbchars = xmlCharEncInput(in, 0); nbchars = xmlCharEncInput(in, 1);
if (nbchars < 0) { if (nbchars < 0) {
xmlIOErr(XML_IO_ENCODER, NULL); xmlIOErr(XML_IO_ENCODER, NULL);
in->error = XML_IO_ENCODER; in->error = XML_IO_ENCODER;