mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 05:46:38 +02:00
core: check that string is not NULL in function string_iconv
This commit is contained in:
@@ -2066,7 +2066,12 @@ string_iconv (int from_utf8, const char *from_code, const char *to_code,
|
||||
char *ptr_inbuf_shift;
|
||||
int done;
|
||||
size_t err, inbytesleft, outbytesleft;
|
||||
#endif
|
||||
|
||||
if (!string)
|
||||
return NULL;
|
||||
|
||||
#ifdef HAVE_ICONV
|
||||
if (from_code && from_code[0] && to_code && to_code[0]
|
||||
&& (string_strcasecmp(from_code, to_code) != 0))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user