aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/camel-mime-part-utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/camel/camel-mime-part-utils.c b/camel/camel-mime-part-utils.c
index 19f58bf1d2..0d79c02e9a 100644
--- a/camel/camel-mime-part-utils.c
+++ b/camel/camel-mime-part-utils.c
@@ -158,6 +158,10 @@ convert_buffer (GByteArray *in, const char *to, const char *from)
/* flush the iconv conversion */
e_iconv (cd, NULL, NULL, &outbuf, &outleft);
+ /* now set the true length on the GByteArray */
+ converted = outlen - outleft;
+ g_byte_array_set_size (out, converted);
+
e_iconv_close (cd);
return out;