Ticket #1835 (closed enhancement: fixed)
Bug in get_codepage_index function.
Reported by: | ASM | Owned by: | slavazanko |
---|---|---|---|
Priority: | trivial | Milestone: | 4.7.0 |
Component: | mc-core | Version: | master |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Branch state: | Votes for changeset: | committed-master |
Description
Hello!
I find bug, file charsets.c, function get_codepage_index.
Construction:
for (i = 0; codepages[i].id; ++i)
need:
for (i = 0; i < n_codepages; i++)
because codepages[n_codepages] don't NULL!
Attachments
Change History
Changed 15 years ago by ASM
- Attachment get_codepage_index.patch added
comment:1 Changed 15 years ago by andrew_b
- Status changed from new to closed
- Resolution set to invalid
Everything is correct. codepages is filled by zeros initially.
codepages = g_new0 (struct codepage_desc, n_codepages + 1);
comment:3 Changed 15 years ago by slavazanko
- Status changed from closed to reopened
- Resolution invalid deleted
- Priority changed from major to trivial
- Version set to master
- Milestone set to 4.7.0
- Type changed from defect to enhancement
As for me, this good patch for one-style coding (even if no any bugs found :)
comment:4 Changed 15 years ago by slavazanko
- Status changed from reopened to accepted
- Owner set to slavazanko
comment:5 Changed 15 years ago by slavazanko
- severity changed from no branch to on review
Created branch 1835_fix_logic_in_get_codepage_index
Initial changeset:b067fd9896e6c1b922d8d02ade98ec35e2046cf0
Review.
comment:7 Changed 15 years ago by slavazanko
- Votes for changeset changed from andrew_b to andrew_b slavazanko
- severity changed from on review to approved
Note: See
TracTickets for help on using
tickets.
Patch