From owner-freebsd-bugs@FreeBSD.ORG Mon May 5 17:50:04 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A13C106564A for ; Mon, 5 May 2008 17:50:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 398FC8FC17 for ; Mon, 5 May 2008 17:50:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m45Ho31k005437 for ; Mon, 5 May 2008 17:50:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m45Ho3HL005436; Mon, 5 May 2008 17:50:03 GMT (envelope-from gnats) Date: Mon, 5 May 2008 17:50:03 GMT Message-Id: <200805051750.m45Ho3HL005436@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Bruce Cran Cc: Subject: Re: bin/100089: ftp(1): default ftp application of FreeBSD gives segmentation fault X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Bruce Cran List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2008 17:50:04 -0000 The following reply was made to PR bin/100089; it has been noted by GNATS. From: Bruce Cran To: bug-followup@FreeBSD.org, Roel Verdult 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