Inetutils FTP client and GCC4

William Harrington wwh20610 at cmsu2.cmsu.edu
Sun Aug 7 14:51:52 PDT 2005


On Sun, 07 Aug 2005 15:46:56 -0500, Randy McMurchy wrote:

> Hi all,
> 
> Some weird activity with the Inetutils FTP client when compiled with
> GCC-4.0.1. Note that a new patch has been introduced to the GCC-4
> branch of LFS to "correct" GCC4 problems. This patch affects two
> files used to compile the ftp client program. If anybody can
> explain, or care to comment about the following screen output,
> I would appreciate it.
> 
> Here's a summary of what is wrong:
> 
> I can connect to any FTP server and successfully log in. However,
> upon issuing *any* command (pwd, ascii, get, cd, etc), it segfaults.
> 
> Below is some screen output connecting to different FTP servers.
> 
> randy at rmlinux: ~ > ftp rmlscsi
> Connected to rmlscsi.mcmurchy.prv.
> 220 rmlscsi.mcmurchy.prv FTP server (GNU inetutils 1.4.2) ready.
> Name (rmlscsi:randy):
> 331 Password required for randy.
> Password:
> 230 User randy logged in.
> Remote system type is UNIX.
> Using binary mode to transfer files.
> ftp> pwd
> Segmentation fault
> 
> 
> randy at rmlinux: ~ > ftp space.mit.edu
> Connected to space.mit.edu.
> 220-space.mit.edu NcFTPd Server (free educational license) ready.
> 220-
> 220-        This server is operated by the MIT Center for Space Research.
> 220-        Only anonymous FTP access is allowed to this server.  Use the
> 220-        login Name `ftp', and use your e-mail address for the password.
> 220-
> 220
> Name (space.mit.edu:randy): ftp
> 331 Guest login ok, send your complete e-mail address as password.
> Password:
> 230 Logged in anonymously.
> Remote system type is UNIX.
> Using binary mode to transfer files.
> ftp> pwd
> Segmentation fault
> 
> 
> randy at rmlinux: ~ > ftp anduin.linuxfromscratch.org
> Connected to anduin.linuxfromscratch.org.
> 220 This is the LFS/BLFS package archive powered by ServerBeach.
> Name (anduin.linuxfromscratch.org:randy): anonymous
> 331 Please specify the password.
> Password:
> 230 Login successful.
> Remote system type is UNIX.
> Using binary mode to transfer files.
> ftp> pwd
> Segmentation fault

Hello,

   I discovered this problem way back when I did an SVN-20050428 build with gcc-4.0.0. I used netkit-ftp's code cause it seemed more proper than how inetutils ftp was doing it. Take a look and compare the code, you might see where inetutils is messing up. I kind of have a clue that it is in the termination of strings causing the out of bounds, I haven't the time to declare that true.

William



More information about the lfs-dev mailing list