Ticket #1942: MC crashes on exit when using C locale.
Starting mc with: LANG=C mc cases a crash when mc exits. No other LC_* variable was set. The issue is in src/strutil.c module. With C locale, str_init_strings() fails to set str_cnv_not_convert variable leaving it with value -1 (INVALID_CONV). str_uninit_strings() passes str_cnv_not_convert blindly to g_iconv_close() which tries to dereference it. This commit adds a check to str_uninit_strings() if str_cnv_not_convert value is valid. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Этот коммит содержится в:
родитель
07f3009b71
Коммит
d80f098c11
@ -404,7 +404,8 @@ str_init_strings (const char *termenc)
|
||||
void
|
||||
str_uninit_strings (void)
|
||||
{
|
||||
g_iconv_close (str_cnv_not_convert);
|
||||
if (str_cnv_not_convert != INVALID_CONV)
|
||||
g_iconv_close (str_cnv_not_convert);
|
||||
g_free (codeset);
|
||||
}
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user