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
This commit is contained in:
committed by
Chris Lahey
parent
dd8def8723
commit
1534d99bbd
@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user