Bug 187605 - Crash when listing directory contents
Crash when listing directory contents
Product: Fedora
Classification: Fedora
Component: ncftp (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: Matthias Saou
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2006-04-01 12:08 EST by Lauri Nurmi
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: 3.1.9-4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-05-12 07:23:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Lauri Nurmi 2006-04-01 12:08:31 EST
Description of problem:
ncftp crashes when locale is fi_FI.UTF-8 and trying to list the contents of a
remote directory (using 'dir'). The crash probably has something to do with
non-ASCII letters in month names.

Version-Release number of selected component (if applicable):

How reproducible:
Every time, when the directory contains a file with a timestamp from a certain

Steps to Reproduce:
1. Connect to a server, e.g. LC_ALL=fi_FI.UTF-8 ncftp ftp.funet.fi
2. say 'dir'
3. *crash*
Actual results:

Logged in to ftp.funet.fi.
ncftp / > dir
drwxr-xr-x                maalis 15 23:54   dev
drwxr-xr-x                maalis 29 23:11   index
drwxrwxr-x                maalis 29 22:16   pub
-rw-r--r--        19796   maalis 30 00:23   README
-rw-r--r--         5524   elo    24  2000   README.FILETYPES
-rw-r--r--         5120   marras 20  1996   README.UPLOADER
drwxr-xr-x                huhti   1 17:16   rfc
*** stack smashing detected ***: /usr/bin/ncftp terminated

With a version with debug symbols we can see a backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x0013ec46 in vfprintf () from /lib/libc.so.6
(gdb) bt
#0  0x0013ec46 in vfprintf () from /lib/libc.so.6
#1  0x00144282 in fprintf () from /lib/libc.so.6
#2  0x080539d6 in LsL (dirp=0xbfad9548, endChars=0, linkedTo=0,
    stream=0x2304c0) at ls.c:390
#3  0x08054014 in Ls (item=0x0, listmode=108, options=0xbfad97f8 "",
    stream=0x2304c0) at ls.c:620
#4  0x0804d2a2 in ListCmd (argc=1, argv=0xbfad98d4, cmdp=0x80897e0,
    aip=0xbfad98d4) at cmds.c:1550
#5  0x08055670 in DoCommand (aip=0xbfad98d4) at shell.c:408
#6  0x08055a0d in CommandShell () at shell.c:582
#7  0x08054e59 in main (argc=2, argv=0xbfada9e4) at main.c:492

Expected results:
No crash.

Additional info:
I tested a few other locales besides fi_FI.UTF-8, but no crash with them.
Comment 1 Matthias Saou 2006-05-10 06:56:21 EDT
I've taken the time to reproduce the problem with an unpatched build of the
3.1.9 sources, and reported the problem upstream. Hopefully they will fix this
for the next release and provide a patch against 3.1.9 for now.
Comment 2 Matthias Saou 2006-05-12 07:23:36 EDT
Got a patch back from Mike Gleason which fixes the problem. New builds are done
and will appear shortly.

Note You need to log in before you can comment on or make changes to this bug.