aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@src.gnome.org>2002-04-11 04:03:51 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-04-11 04:03:51 +0800
commitbf2a13c1efac6b338dbc6e831ce68a16b2892797 (patch)
tree0e9d7fb48a2bd4bc7bd8b3086bc529ac54068844 /camel
parent5a08bd3e44b69675097741e6aa34d9009a43b6af (diff)
downloadgsoc2013-evolution-bf2a13c1efac6b338dbc6e831ce68a16b2892797.tar.gz
gsoc2013-evolution-bf2a13c1efac6b338dbc6e831ce68a16b2892797.tar.zst
gsoc2013-evolution-bf2a13c1efac6b338dbc6e831ce68a16b2892797.zip
oops, after converting everything truncate the GByteArray to the correct length (in case we over-allocated)
svn path=/trunk/; revision=16429
Diffstat (limited to 'camel')
-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;