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 | |
parent | 0d3ec1ae39ce2a93d77d266a257b2b9b6048a8a5 (diff) | |
download | gsoc2013-evolution-5a94f4ea53dd760b98e55bd33d642c09dfca3cb9.tar gsoc2013-evolution-5a94f4ea53dd760b98e55bd33d642c09dfca3cb9.tar.gz gsoc2013-evolution-5a94f4ea53dd760b98e55bd33d642c09dfca3cb9.tar.bz2 gsoc2013-evolution-5a94f4ea53dd760b98e55bd33d642c09dfca3cb9.tar.lz gsoc2013-evolution-5a94f4ea53dd760b98e55bd33d642c09dfca3cb9.tar.xz 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
-rw-r--r-- | camel/ChangeLog | 4 | ||||
-rw-r--r-- | camel/camel-mime-part-utils.c | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index ea2d2911e4..c3a5abf485 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,5 +1,9 @@ 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? + * providers/local/camel-spool-summary.c (summary_rebuild): Likewise. * providers/local/camel-mbox-summary.c (summary_rebuild): 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; } |