Ticket #1942 (closed defect: fixed)
mc crashes on exit when using C locale
Reported by: | mcermak | Owned by: | andrew_b |
---|---|---|---|
Priority: | major | Milestone: | 4.7.1 |
Component: | mc-core | Version: | 4.7.0.1 |
Keywords: | crash | Cc: | |
Blocked By: | Blocking: | ||
Branch state: | Votes for changeset: | committed-master |
Description
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.
Attached patch adds a check to str_uninit_strings() if str_cnv_not_convert value is valid.
Attachments
Change History
Changed 15 years ago by mcermak
- Attachment 10_locale_c_iconv.patch added
comment:1 Changed 15 years ago by andrew_b
- Owner set to andrew_b
- Status changed from new to accepted
- Votes for changeset set to andrew_b
- severity changed from no branch to on review
Created 1942_crash_on_exit branch. Parent branch is master.
changeset:962394e57bc878542b26772bce7ed2e3856c1e93
comment:3 Changed 15 years ago by angel_il
- Votes for changeset changed from andrew_b to andrew_b angel_il
- severity changed from on review to approved
comment:4 Changed 15 years ago by andrew_b
- Status changed from accepted to testing
- Votes for changeset changed from andrew_b angel_il to commited-master
- Resolution set to fixed
- severity changed from approved to merged
Merged to master.
changeset:d80f098c119eca68462410d7b8e66ccd25a827f5
comment:6 Changed 15 years ago by slavazanko
cherry-picked into 4.7.0-stable: 43bb84d66d9d04da93e48c98057e6b781fbef878
Fix for invalid pointer dereference in str_uninit_strings()