Ticket #3116 (closed defect: fixed)
fix various segfauls fixed in fedora
Reported by: | eugenesan | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 4.8.12 |
Component: | mc-core | Version: | master |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Branch state: | no branch | Votes for changeset: | committed-master |
Description
Fix various segfauls by importing patches from Fedora
Attachments
Change History
Changed 11 years ago by eugenesan
- Attachment fix-various-segfaults-fixed-in-fedora.patch added
comment:1 Changed 11 years ago by andrew_b
- Blocked By 3113 added
- Milestone changed from Future Releases to 4.8.12
comment:2 Changed 11 years ago by andrew_b
diff --git a/src/editor/editcmd.c b/src/editor/editcmd.c index b726b85..e976def 100644 --- a/src/editor/editcmd.c +++ b/src/editor/editcmd.c @@ -3415,7 +3415,8 @@ edit_load_back_cmd (WEdit * edit) return FALSE; edit_stack_iterator--; - if (edit_history_moveto[edit_stack_iterator].filename_vpath != NULL) + if (edit_stack_iterator >= 0 + && edit_history_moveto[edit_stack_iterator].filename_vpath != NULL) return edit_reload_line (edit, edit_history_moveto[edit_stack_iterator].filename_vpath, edit_history_moveto[edit_stack_iterator].line);
This patch seems incorrect. edit_stack iterator is unsigned. Therefore the condition edit_stack_iterator >= 0 is always true.
Note: See
TracTickets for help on using
tickets.
fix various segfauls fixed in fedora