mc crashes when trying to move file to nonexistent directory in FTP

Bug #770673 reported by Vladimir Rutsky
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mc (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: mc

To reproduce follow these steps:
1. Start mc:
$ mc
2. Open ftp directory in mc by entering in command line:
cd /#ftp:l33t@1337ftp.co.cc:l33thackersFTW@1337ftp.co.cc
(any FTP server with write access should be acceptable, this is first address I found in Internet:
http://www.l33thackers.com/Thread-Public-FTP-for-l33thackers so this is NOT private information.)
3. Navigate to any file in FTP directory, press <F6> to start moving, enter target directory name that doesn't exists, like "test14323/"

Expected behavior:
mc should report that file can not be moved.

Observed behavior:
mc crashes with SIGSEGV:

ftpfs: CWD failed.
Program received signal SIGSEGV, Segmentation fault. [^]
vfs_s_generate_entry (me=0x6e8cc0, name=0x7aa0b5 "mmmfrosty.exe", parent=0x0, mode=<value optimized out>) at direntry.c:192lete 9PullDn 10Quit
192 direntry.c: No such file or directory.
 in direntry.c

Stack trace:
#0 vfs_s_generate_entry (me=0x6e8cc0, name=0x7aa0b5 "mmmfrosty.exe", parent=0x0, mode=<value optimized out>) at direntry.c:192
#1 0x000000000046e86e in vfs_s_open (me=0x6e8cc0, file=<value optimized out>, flags=193, mode=33188) at direntry.c:768
#2 0x0000000000472674 in mc_open (filename=<value optimized out>, flags=193) at vfs.c:555
#3 0x000000000043fc1a in copy_file_file (ctx=0x79d780, src_path=0x778300 "/#ftp:l33t@1337ftp.co.cc:l33thackersFTW@1337ftp.co.cc/mmmfrosty.exe",
    dst_path=0x795d60 "test/mmmfrosty.exe", ask_overwrite=<value optimized out>, progress_count=<value optimized out>, progress_bytes=0x7fffffffda78,
    is_toplevel_file=1) at file.c:585
#4 0x000000000044013e in move_file_file (ctx=0x79d780, s=0x778300 "/#ftp:l33t@1337ftp.co.cc:l33thackersFTW@1337ftp.co.cc/mmmfrosty.exe",
    d=0x795d60 "test/mmmfrosty.exe", progress_count=0x7fffffffda80, progress_bytes=0x7fffffffda78) at file.c:1094
#5 0x000000000044147b in panel_operate (source_panel=0x78af50, operation=OP_MOVE, force_single=0) at file.c:2059
#6 0x00000000004376dc in rename_cmd () at cmd.c:355
#7 0x0000000000450ee5 in midnight_execute_cmd (sender=0x1175d5e2, command=52124) at main.c:1294
#8 0x0000000000451776 in midnight_callback (h=<value optimized out>, sender=0x6ea0a0, msg=<value optimized out>, parm=52124, data=0xffffffff) at main.c:1685
#9 0x00000000004271c9 in buttonbar_call (w=0x7a6e40, msg=<value optimized out>, parm=1006) at widget.c:2659
#10 buttonbar_callback (w=0x7a6e40, msg=<value optimized out>, parm=1006) at widget.c:2687
#11 0x000000000041d5d1 in send_message (h=0x798b90, key=1006, event=<value optimized out>) at ../src/dialog.h:235
#12 dlg_try_hotkey (h=0x798b90, key=1006, event=<value optimized out>) at dialog.c:677
#13 dlg_key_event (h=0x798b90, key=1006, event=<value optimized out>) at dialog.c:713
#14 dlg_process_event (h=0x798b90, key=1006, event=<value optimized out>) at dialog.c:823
#15 0x000000000041d7f7 in frontend_run_dlg (h=0x798b90) at dialog.c:855
#16 run_dlg (h=0x798b90) at dialog.c:870
#17 0x00000000004502f9 in create_panels_and_run_mc (argc=1, argv=0x7fffffffe118) at main.c:1783
#18 do_nc (argc=1, argv=0x7fffffffe118) at main.c:1877
#19 main (argc=1, argv=0x7fffffffe118) at main.c:2203

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: mc 3:4.7.0.6-1
ProcVersionSignature: Ubuntu 2.6.35-28.50-generic 2.6.35.11
Uname: Linux 2.6.35-28-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Tue Apr 26 08:33:47 2011
SourcePackage: mc

Related branches

Revision history for this message
Vladimir Rutsky (rutsky) wrote :
Revision history for this message
Yury V. Zaytsev (zyv) wrote :

Whoops! Also crashes 4.7.0.9 for me. Have to try on 4.7.5.2 and file a bug with m-c.o if it is still reproducible there...

Changed in mc (Ubuntu):
status: New → Confirmed
Revision history for this message
Maarten Bezemer (veger) wrote :

It also crashed version 3:4.7.0.9-2
I tried version 4.8.1 (see bug #905610) and the problem is fixed: an error is show that the command failed

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (5.4 KiB)

This bug was fixed in the package mc - 3:4.8.1-2ubuntu1

---------------
mc (3:4.8.1-2ubuntu1) precise; urgency=low

  * Sync from debian testing (LP: #905610, LP: #314614, LP: #410031,
      LP: #562361, LP: #632816, LP: #713630, LP: #770673, LP: #837163)
  * Added Pre-Depends for dpkg-maintscript-helper availability

mc (3:4.8.1-2) unstable; urgency=low

  * Build-Depends are updated: 'bison' moved to build-deps;
    architecture wildcard replaced silly "type-handling | not+linux-gnu"
    (Closes: #587875 N:"Please remove type-handling dependency")
  * new patch to increase maximum file size for mcedit to 128 MiB
    (Closes: #369565 W:"mcedit: wishing a bigger file size limit")
    Thanks to Daniele Giacomini.
  * new patch to disable "Return does autoindent" by default in mcedit
    (Closes: #570502 N:"mcedit: adding extra spaces when pasting a text
     preceded by spaces")
    (Closes: #575711 N:"pasting extra tabs, AGAIN")
  * added mc.NEWS file with notes about important changes in this release
    (Closes: #661435 W:"lynx-like motion is lost during upgrade to 4.8.1")
  * added symlinks to all scripts in /usr/lib/mc for backward compatibility
  * new patch to correct path to scripts in man page
    (Closes: #661481 N:"Acknowledgement mc: /usr/share/mc/bin/mc.sh missing")
  * 'unzip' added to build-deps to set proper zip mode at build-time;
    'unzip' moved to Recommends from Suggests.
    (Closes: #661467 N:"mc: zip file browsing broken")
  * Recommends 'perl' and 'unzip' instead of Suggests
  * dropped old 20_wrong_path_to_wrappers.patch, which was breaking
    correct path to wrappers (note the precisely chosen file name ;)
  * corrected and properly annotated 09_uzip_broken_528239.patch

mc (3:4.8.1-1) unstable; urgency=low

  * New upstream release [December 2011]
    (Closes: #618542 N:"please follow upstream progress")
    (Closes: #528331 N:"[VFS] utar is unable to open .tar files")
    (Closes: #626287 N:"SHIFT+F6 should open rename dialog")
    (Closes: #609489 I:"If <F4> is pressed ~/.mc/cedit/Syntax is missing")
    (Closes: #606331 I:"regression: panel configuration on startup;
     view search configuration")
    (Closes: #567119 I:"mcedit ignores editnormal in MC_COLOR_TABLE")
    (Closes: #587372 N:"fish does not preserve modification time when
     copying files to remote host")
    (Closes: #592396 N:"file rename (F6) with non-usual characters failed")
    (Closes: #525146 N:"mc hangs when copying multiple files from ftp")
    (Closes: #574761 N:" [VFS] internal tar considers files containig
     '@' as directories.")
    (Closes: #584687 N:"mc/fish segfaults when remote copy/move appends
     to existing file")
    (Closes: #619092 W:"Wishlist: mc to open ISO files")
    (Closes: #602857 M:"use 7zr for generic .7z archives if available")
    (Closes: #61987 W:"total ETA wanted")
  * debian/watch
    • fixed and updated to fetch latest .tar.xz
  * dropped CDBS, now using debhelper only
  * debhelper & compat to version 9
  * dh-autoreconf to update toolchain
  * intltoolize to refresh Makefile.in.in
  * debian/control
    • standards to 3.9.3 (thanks to Andreas Tille)
    • added to build-deps:
      + 'type-handling...

Read more...

Changed in mc (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.