From 2025fe27535cb4190eebe02eb151fae5bc7b2c01 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Fri, 12 Oct 2001 15:54:04 +0000 Subject: Fixed a crash here for NULL ofrom. 2001-10-12 Christopher James Lahey * gal/util/e-iconv.c (e_iconv_open): Fixed a crash here for NULL ofrom. svn path=/trunk/; revision=13622 --- e-util/e-iconv.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'e-util') 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); -- cgit v1.2.3