aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2001-08-24 11:59:36 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-08-24 11:59:36 +0800
commit5a94f4ea53dd760b98e55bd33d642c09dfca3cb9 (patch)
treed6ac5779d5f072a3d03e61d4ea9c0e02e9ff7f78 /camel
parent0d3ec1ae39ce2a93d77d266a257b2b9b6048a8a5 (diff)
downloadgsoc2013-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
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog4
-rw-r--r--camel/camel-mime-part-utils.c3
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;
}