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): ncftp-3.1.9-3 How reproducible: Every time, when the directory contains a file with a timestamp from a certain month. 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.
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.
Got a patch back from Mike Gleason which fixes the problem. New builds are done and will appear shortly.