aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-iconv.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-10-12 23:54:04 +0800
committerChris Lahey <clahey@src.gnome.org>2001-10-12 23:54:04 +0800
commit2025fe27535cb4190eebe02eb151fae5bc7b2c01 (patch)
treedb7c92c3ec14bd6402ff11e5fee68d28e5329798 /e-util/e-iconv.c
parent8c65b37a091fa66bd2f7a17767455e353ff7ef81 (diff)
downloadgsoc2013-evolution-2025fe27535cb4190eebe02eb151fae5bc7b2c01.tar.gz
gsoc2013-evolution-2025fe27535cb4190eebe02eb151fae5bc7b2c01.tar.zst
gsoc2013-evolution-2025fe27535cb4190eebe02eb151fae5bc7b2c01.zip
Fixed a crash here for NULL ofrom.
2001-10-12 Christopher James Lahey <clahey@ximian.com> * gal/util/e-iconv.c (e_iconv_open): Fixed a crash here for NULL ofrom. svn path=/trunk/; revision=13622
Diffstat (limited to 'e-util/e-iconv.c')
-rw-r--r--e-util/e-iconv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/e-util/e-iconv.c b/e-util/e-iconv.c
index 7e79d430b5..fdd66fa956 100644
--- a/e-util/e-iconv.c
+++ b/e-util/e-iconv.c
@@ -319,6 +319,10 @@ iconv_t e_iconv_open(const char *oto, const char *ofrom)
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);