aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-iconv.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-10-13 05:32:42 +0800
committerChris Lahey <clahey@src.gnome.org>2001-10-13 05:32:42 +0800
commit1534d99bbd8c7d32fde4b00a8cf3db3aa1ea440e (patch)
treed9ab05ef100c0655a9e3036e8a49db79f8e06741 /e-util/e-iconv.c
parentdd8def8723363ab8600eac24c4fc1a5d530f05c2 (diff)
downloadgsoc2013-evolution-1534d99bbd8c7d32fde4b00a8cf3db3aa1ea440e.tar.gz
gsoc2013-evolution-1534d99bbd8c7d32fde4b00a8cf3db3aa1ea440e.tar.zst
gsoc2013-evolution-1534d99bbd8c7d32fde4b00a8cf3db3aa1ea440e.zip
Changed the crash fix to just return -1.
2001-10-12 Christopher James Lahey <clahey@ximian.com> * gal/util/e-iconv.c (e_iconv_open): Changed the crash fix to just return -1. svn path=/trunk/; revision=13629
Diffstat (limited to 'e-util/e-iconv.c')
-rw-r--r--e-util/e-iconv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/e-util/e-iconv.c b/e-util/e-iconv.c
index fdd66fa956..35106577f0 100644
--- a/e-util/e-iconv.c
+++ b/e-util/e-iconv.c
@@ -317,12 +317,12 @@ iconv_t e_iconv_open(const char *oto, const char *ofrom)
struct _iconv_cache_node *in;
iconv_t ip;
+ if (oto == NULL || ofrom == NULL)
+ return (iconv_t)-1;
+
to = e_iconv_charset_name(oto);
from = e_iconv_charset_name(ofrom);
- if (to == NULL)
- to = "";
- if (from == NULL)
- from = "";
+
tofrom = alloca(strlen(to) +strlen(from) + 2);
sprintf(tofrom, "%s%%%s", to, from);