Description of problem: when moving cursor in binary file, mc crashes Version-Release number of selected component (if applicable): mc-4.6.2-7.pre1.fc10.x86_64 How reproducible: always Steps to Reproduce: 1.open some binary file for editing 2.use ctrl+right arrow 3. Actual results: sigsegv Expected results: no sigsegv Additional info:
(gdb) bt #0 strchr () at ../sysdeps/x86_64/strchr.S:101 #1 0x000000000044fedf in my_type_of (c=1048064) at edit.c:1820 #2 0x0000000000452df7 in edit_right_word_move () at edit.c:1868 #3 edit_right_word_move_cmd () at edit.c:1888 #4 edit_execute_cmd (edit=0x2819e20, command=<value optimized out>, char_for_insertion=<value optimized out>) at edit.c:2485 #5 0x000000000045441a in edit_execute_key_command (edit=0x2819e20, command=9, char_for_insertion=4294967295) at edit.c:2292 #6 0x000000000045b798 in edit_callback (w=0x2819e20, msg=<value optimized out>, parm=<value optimized out>) at editwidget.c:349 #7 0x0000000000412af4 in dlg_key_event () at dialog.c:659 #8 dlg_process_event (h=0x2800530, key=16789, event=<value optimized out>) at dialog.c:753 #9 0x0000000000412e76 in frontend_run_dlg () at dialog.c:785 #10 run_dlg (h=0x2800530) at dialog.c:800 #11 0x000000000045b45e in edit_file (_file=<value optimized out>, line=0) at editwidget.c:212 #12 0x000000000040e315 in do_edit_at_line (what=0x2809370 "dovecot.index.cache", start_line=1048064) at cmd.c:270 #13 0x0000000000448b68 in buttonbar_call (bb=0x7fff9863c000, i=0) at widget.c:2552 #14 0x0000000000449435 in buttonbar_callback (w=0x2803a80, msg=<value optimized out>, parm=1004) at widget.c:2574 #15 0x0000000000412bbf in dlg_try_hotkey () at dialog.c:614 #16 dlg_key_event () at dialog.c:652 #17 dlg_process_event (h=0x27ed5e0, key=1004, event=<value optimized out>) at dialog.c:753 #18 0x0000000000412e76 in frontend_run_dlg () at dialog.c:785 #19 run_dlg (h=0x27ed5e0) at dialog.c:800 #20 0x00000000004293c4 in setup_panels_and_run_mc () at main.c:1740 #21 do_nc () at main.c:1812 #22 main (argc=<value optimized out>, argv=<value optimized out>) at main.c:2319
problem is in edit.c : static unsigned long my_type_of (int c) see backtrace: #1 - it gets 'c' = 1048064 this pass: if (!c) return 0; but produces sigsegv here: while ((q = strchr (q + 1, c))); reason: strch won't terminate at the end of array as q is array of chars and (char)c == 0 == 1048064 % 256
Fixed in rawhide, thanks for reporting :)
I've tested it and it works fine, thanks
mc-4.6.2-10.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/mc-4.6.2-10.fc11
mc-4.6.2-10.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.
mc-4.6.2-8.fc10 has been submitted as an update for Fedora 10. http://admin.fedoraproject.org/updates/mc-4.6.2-8.fc10
mc-4.6.2-4.fc9 has been submitted as an update for Fedora 9. http://admin.fedoraproject.org/updates/mc-4.6.2-4.fc9
mc-4.6.2-4.fc9 has been pushed to the Fedora 9 stable repository. If problems still persist, please make note of it in this bug report.
mc-4.6.2-8.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report.