diff options
author | Christopher James Lahey <clahey@ximian.com> | 2001-10-13 05:32:42 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-10-13 05:32:42 +0800 |
commit | 1534d99bbd8c7d32fde4b00a8cf3db3aa1ea440e (patch) | |
tree | d9ab05ef100c0655a9e3036e8a49db79f8e06741 | |
parent | dd8def8723363ab8600eac24c4fc1a5d530f05c2 (diff) | |
download | gsoc2013-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
-rw-r--r-- | e-util/e-iconv.c | 8 |
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); |