Ticket #3174 (new defect)

Opened 6 years ago

Last modified 6 years ago

Segmentation fault while trying to get list of FTP directory of Microsoft FTP server

Reported by: lutra Owned by:
Priority: minor Milestone: Future Releases
Component: mc-vfs Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

I've got bunch of:

"Cannot parse:

02-18-14 10:17PM 744 .htaccess."

messages, then mc says:
" Error:
More parsing errors will be ignored.", and then segfaults on:

0x0000000000466492 in ftpfs_dir_load (me=0x6fe1a0, dir=0x8056f0, remote_path=0x8036a0 "mmt") at ftpfs.c:1750
1750	    if ((ftpfs_get_reply (me, SUP->sock, NULL, 0) != COMPLETE))

Here is backtrace:

(gdb) where
#0  0x0000000000466492 in ftpfs_dir_load (me=0x6fe1a0, dir=0x805730, remote_path=0x8036d0 "mm") at ftpfs.c:1750
#1  0x000000000046b3af in vfs_s_find_entry_linear (me=0x6fe1a0, root=0x802f50, a_path=<optimized out>, follow=<optimized out>, flags=<optimized out>) at direntry.c:289
#2  0x000000000046a40a in vfs_s_find_inode (me=<optimized out>, super=<optimized out>, path=path@entry=0x803590 "mm", follow=follow@entry=15, flags=flags@entry=4) at direntry.c:1044
#3  0x000000000046a6dd in vfs_s_inode_from_path (vpath=vpath@entry=0x803540, flags=flags@entry=5) at direntry.c:386
#4  0x000000000046a883 in vfs_s_opendir (vpath=0x803540) at direntry.c:409
#5  0x000000000046a8e9 in vfs_s_chdir (vpath=<optimized out>) at direntry.c:477
#6  0x0000000000438bdb in mc_chdir (vpath=vpath@entry=0x802ce0) at interface.c:685
#7  0x0000000000445bf8 in _do_panel_cd (panel=0x7eaca0, new_dir_vpath=0x802ce0, cd_type=<optimized out>) at panel.c:3047
#8  0x00000000004460ad in do_panel_cd (panel=0x7eaca0, new_dir_vpath=new_dir_vpath@entry=0x802ce0, cd_type=cd_type@entry=cd_parse_command) at panel.c:4413
#9  0x0000000000419e60 in nice_cd (text=<optimized out>, xtext=<optimized out>, help=<optimized out>, history_name=<optimized out>, prefix=<optimized out>, to_home=<optimized out>, strip_password=1) at cmd.c:533
#10 0x000000000041bf3e in ftplink_cmd () at cmd.c:1513
#11 0x0000000000441105 in midnight_execute_cmd (sender=0x7e63b0, command=121) at midnight.c:1219
#12 0x000000000046e04c in send_message (data=0x0, parm=<optimized out>, msg=MSG_ACTION, sender=0x7e63b0, w=<optimized out>) at ../../lib/widget/widget-common.h:167
#13 menubar_execute (menubar=0x7e63b0) at menu.c:341
#14 0x000000000046f1ee in menubar_handle_key (key=<optimized out>, menubar=0x7e63b0) at menu.c:535
#15 menubar_callback (w=0x7e63b0, sender=<optimized out>, msg=<optimized out>, parm=<optimized out>, data=<optimized out>) at menu.c:590
#16 0x000000000041ff44 in send_message (data=0x0, parm=10, msg=MSG_HOTKEY, sender=0x0, w=<optimized out>) at ../../lib/widget/widget-common.h:167
#17 dlg_try_hotkey (d_key=10, h=0x7da2e0) at dialog.c:449
#18 dlg_key_event (d_key=10, h=0x7da2e0) at dialog.c:508
#19 dlg_process_event (h=h@entry=0x7da2e0, key=10, event=event@entry=0x7fffffffe520) at dialog.c:1230
#20 0x000000000042023c in frontend_dlg_run (h=0x7da2e0) at dialog.c:569
#21 dlg_run (h=0x7da2e0) at dialog.c:1261
#22 0x00000000004425fb in create_panels_and_run_mc () at midnight.c:960
#23 do_nc () at midnight.c:1772
#24 0x000000000040fe85 in main (argc=1, argv=0x7fffffffe778) at main.c:417

I'm using:

GNU Midnight Commander 4.8.11-77-g9bbc510
Built with GLib 2.32.4
Using the S-Lang library with terminfo database
With builtin Editor
With subshell support as default
With support for background operations
With mouse support on xterm
With internationalization support
With multiple codepages support
Virtual File Systems: cpiofs, tarfs, sfs, extfs, ftpfs, fish
Data types: char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;

on Linux hostname 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64 GNU/Linux

I'm not sure of steps you should make to reproduce this bug, because it may be depended on particular FTP server response.

Attachments

parse_ls_vga.c.patch (8.8 KB) - added by slavazanko 5 years ago.
The patch from https://mail.gnome.org/archives/mc-devel/2015-January/msg00000.html

Change History

comment:1 Changed 6 years ago by lutra

  • Priority changed from major to minor
Note: See TracTickets for help on using tickets.