From 083caf5ec8045bfec5f9aca62c6f02dd0007dc92 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Wed, 3 Nov 2010 19:24:05 +0100 Subject: [PATCH] 630140 fix iso995x encoding error https://bugzilla.gnome.org/show_bug.cgi?id=630140 Fix the bug, which happen when using the embedded converters and not iconv --- encoding.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/encoding.c b/encoding.c index b86a547e..a76e9d53 100644 --- a/encoding.c +++ b/encoding.c @@ -2039,7 +2039,11 @@ retry: xmlBufferShrink(in, toconv); out->use += written; writtentot += written; - } + /* multichar cut at end of buffer can generate that problem */ + if (ret == -2) { + ret = -3; + } + } out->content[out->use] = 0; } #ifdef LIBXML_ICONV_ENABLED