Ticket #2858 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

Segfault when viewing HTML files with "mc -v"

Reported by: Nikos Chantziaras Owned by: andrew_b
Priority: major Milestone: 4.8.5
Component: mc-core Version: 4.8.4
Keywords: Cc:
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description

Reported in mc-devel@ list:

(I'm on Linux 64-bit. This happens with current Git master as well as the 4.8.4 release. 4.8.3 does not have the issue. I could not bisect the commit causing this because somewhere along the way, viewing HTML files is not possible at all.)

When viewing HTML files with "mc -v" (or "mcview"), a segfault occurs. Call stack:

  name_quote (lib/util.c:256)
  expand_format (src/filemanager/usermenu.c:863)
  regex_command (src/filemanager/ext.c:177)
  view_file_at_line (src/filemanager/cmd.c:647)
  do_nc (src/filemanager/midnight.c:1006)
  main (src/main.c:567)

In name_quote(), 's' is NULL and thus a segfault occurs when dereferencing it.

Change History

comment:1 Changed 6 years ago by andrew_b

  • Status changed from new to accepted
  • Owner set to andrew_b
  • Version changed from 4.8.1.4 to 4.8.4

comment:2 Changed 6 years ago by andrew_b

  • Branch state changed from no branch to on review

Branch: 2858_mcview_html_segfault (parent: master).
changeset:e2f30017a04b5dc557f9d8dd2e281526eba3c97f

comment:3 Changed 6 years ago by realnc

Thanks. The patch fixes the issue here.

comment:4 Changed 6 years ago by slavazanko

  • Votes for changeset set to slavazanko

comment:5 Changed 6 years ago by angel_il

  • Votes for changeset changed from slavazanko to slavazanko angel_il
  • Branch state changed from on review to approved

comment:6 Changed 6 years ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from slavazanko angel_il to committed-master
  • Resolution set to fixed
  • Branch state changed from approved to merged

comment:7 Changed 6 years ago by andrew_b

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