diff options
author | Not Zed <NotZed@Ximian.com> | 2001-08-24 11:59:36 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-08-24 11:59:36 +0800 |
commit | 5a94f4ea53dd760b98e55bd33d642c09dfca3cb9 (patch) | |
tree | d6ac5779d5f072a3d03e61d4ea9c0e02e9ff7f78 /camel/camel-mime-part-utils.c | |
parent | 0d3ec1ae39ce2a93d77d266a257b2b9b6048a8a5 (diff) | |
download | gsoc2013-evolution-5a94f4ea53dd760b98e55bd33d642c09dfca3cb9.tar.gz gsoc2013-evolution-5a94f4ea53dd760b98e55bd33d642c09dfca3cb9.tar.zst gsoc2013-evolution-5a94f4ea53dd760b98e55bd33d642c09dfca3cb9.zip |
Limit the maximum output buffer size. iconv bugs? returns E2BIG forever on
2001-08-24 Not Zed <NotZed@Ximian.com>
* camel-mime-part-utils.c (convert_buffer): Limit the maximum
output buffer size. iconv bugs? returns E2BIG forever on some
(valid) data?
svn path=/trunk/; revision=12432
Diffstat (limited to 'camel/camel-mime-part-utils.c')
-rw-r--r-- | camel/camel-mime-part-utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/camel/camel-mime-part-utils.c b/camel/camel-mime-part-utils.c index 7dd156a141..bcbc1a2583 100644 --- a/camel/camel-mime-part-utils.c +++ b/camel/camel-mime-part-utils.c @@ -150,8 +150,9 @@ static GByteArray *convert_buffer(GByteArray *in, const char *to, const char *fr convlen = iconv(ic, (const char **)&inbuf, &inlen, &outbuf, &outlen); if (convlen == -1) { g_free(buffer); + g_warning("conversion failed: %s", strerror(errno)); /* we didn't have enough space */ - if (errno == E2BIG) { + if (errno == E2BIG && i<6) { i++; continue; } |