aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLarry Ewing <lewing@ximian.com>2001-10-14 09:08:07 +0800
committerLarry Ewing <lewing@src.gnome.org>2001-10-14 09:08:07 +0800
commit063f8d21af2564bf6c627d791a33e892c413eb7e (patch)
tree34d88f773e2f249017ec4967f9c56b51c425cbb6
parent58404bf5aa9509a6d1dff1ab4891dfe1e3324ac7 (diff)
downloadgsoc2013-evolution-063f8d21af2564bf6c627d791a33e892c413eb7e.tar
gsoc2013-evolution-063f8d21af2564bf6c627d791a33e892c413eb7e.tar.gz
gsoc2013-evolution-063f8d21af2564bf6c627d791a33e892c413eb7e.tar.bz2
gsoc2013-evolution-063f8d21af2564bf6c627d791a33e892c413eb7e.tar.lz
gsoc2013-evolution-063f8d21af2564bf6c627d791a33e892c413eb7e.tar.xz
gsoc2013-evolution-063f8d21af2564bf6c627d791a33e892c413eb7e.tar.zst
gsoc2013-evolution-063f8d21af2564bf6c627d791a33e892c413eb7e.zip
work around broken behavior in some iconv implementions that require the
2001-10-13 Larry Ewing <lewing@ximian.com> * gal/util/e-iconv.c (e_iconv_open): work around broken behavior in some iconv implementions that require the length arguments to be valid pointers event if both buffers are NULL. svn path=/trunk/; revision=13665
-rw-r--r--e-util/e-iconv.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/e-util/e-iconv.c b/e-util/e-iconv.c
index 97c290e1c9..531d23efd6 100644
--- a/e-util/e-iconv.c
+++ b/e-util/e-iconv.c
@@ -387,8 +387,13 @@ iconv_t e_iconv_open(const char *oto, const char *ofrom)
cd(printf("using existing iconv converter '%s'\n", ic->conv));
ip = in->ip;
if (ip != (iconv_t)-1) {
+ /* work around some broken iconv implementations
+ * that die if the length arguments are NULL
+ */
+ size_t buggy_iconv = 0;
+
/* resets the converter */
- iconv(ip, NULL, NULL, NULL, NULL);
+ iconv(ip, NULL, &buggy_iconv, NULL, &buggy_iconv);
in->busy = TRUE;
e_dlist_remove((EDListNode *)in);
e_dlist_addhead(&ic->open, (EDListNode *)in);