Ticket #1391 (closed defect: fixed)

Opened 15 years ago

Last modified 15 years ago

mc segfaults if mc.charsets can't be found

Reported by: winnie Owned by: winnie
Priority: major Milestone: 4.7.0-pre1
Component: mc-core Version: 4.6.2
Keywords: Cc:
Blocked By: Blocking:
Branch state: Votes for changeset: slavazanko winnie

Description

As previously reported mc segfauls if mc.charsets is not found, because then codepages = NULL and in get_codepage_index in charsets.c we try to get codepages[i].id, this will clearly segfault then.

So we have to make sure:

1.) that load_codepage_list is more fault tolerant
2.) that mc doesn't crash if codepage is NULL

Change History

comment:1 Changed 15 years ago by winnie

  • severity changed from no branch to on rework

See branch 1391_segfault_on_empty_codepages

comment:2 Changed 15 years ago by winnie

  • Owner set to winnie
  • Status changed from new to accepted

comment:3 Changed 15 years ago by winnie

  • Milestone changed from 4.7 to 4.7.0-pre1

comment:4 Changed 15 years ago by andrew_b

  • severity changed from on rework to on review

changeset:bbf86c87f5eec4520efbbaed242b07f84d02af45

If mc.charsets file cannot be read, add default ASCII codepage to the codepages list.
Some code clean up. Type accuracy.

comment:5 Changed 15 years ago by slavazanko

  • Votes for changeset set to slavazanko

nice. Now if file mc.charsets is absent, in any case '7-bit ASCII' charset will present.
vote here.

comment:6 Changed 15 years ago by andrew_b

Fixed error introduced in previous commit.
changeset: 1b4bc8b91d3d8e60523b7dec56084ab167cb09bd (forced update)

comment:7 Changed 15 years ago by winnie

  • Votes for changeset changed from slavazanko to slavazanko winnie
  • severity changed from on review to approved

My vote here also, this fix is fine.

comment:8 Changed 15 years ago by winnie

  • Status changed from accepted to testing
  • Resolution set to fixed
  • severity changed from approved to merged

comment:9 Changed 15 years ago by winnie

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.