From bf2a13c1efac6b338dbc6e831ce68a16b2892797 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Wed, 10 Apr 2002 20:03:51 +0000 Subject: oops, after converting everything truncate the GByteArray to the correct length (in case we over-allocated) svn path=/trunk/; revision=16429 --- camel/camel-mime-part-utils.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'camel') 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; -- cgit v1.2.3