Date: Mon, 5 May 2008 17:50:03 GMT From: Bruce Cran <bruce@cran.org.uk> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/100089: ftp(1): default ftp application of FreeBSD gives segmentation fault Message-ID: <200805051750.m45Ho3HL005436@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/100089; it has been noted by GNATS. From: Bruce Cran <bruce@cran.org.uk> To: bug-followup@FreeBSD.org, Roel Verdult <roel@roeltje.com> Cc: Subject: Re: bin/100089: ftp(1): default ftp application of FreeBSD gives segmentation fault Date: Mon, 05 May 2008 18:42:19 +0100 The problem occurs when the user is running named: one of the lines in 'ps -aux' begins with "bind" (since named runs under the username 'bind'), which libedit interprets as a command. The same problem can be seen just by running > echo bind | ftp The problem occurs because editline is only intialized if an interactive tty is being used. Otherwise, the controlediting function in util.c skips all the intializing calls. However, later on cmdscanner is called which attempts to run el_parse on unknown commands. 'el' is NULL and causes a segfault when it's dereferenced in map_bind (map.c:1261). The fix is to prevent cmdscanner calling el_parse if 'editing' is 0. -- Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200805051750.m45Ho3HL005436>