From owner-cvs-src@FreeBSD.ORG Tue Oct 30 05:03:38 2007 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70E2A16A417; Tue, 30 Oct 2007 05:03:38 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6151813C4BB; Tue, 30 Oct 2007 05:03:38 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l9U53cOX017346; Tue, 30 Oct 2007 05:03:38 GMT (envelope-from kensmith@repoman.freebsd.org) Received: (from kensmith@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l9U53cQZ017345; Tue, 30 Oct 2007 05:03:38 GMT (envelope-from kensmith) Message-Id: <200710300503.l9U53cQZ017345@repoman.freebsd.org> From: Ken Smith Date: Tue, 30 Oct 2007 05:03:38 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/usr.sbin/sysinstall config.c dmenu.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2007 05:03:38 -0000 kensmith 2007-10-30 05:03:38 UTC FreeBSD src repository Modified files: usr.sbin/sysinstall config.c dmenu.c Log: Selecting amd and a few other things in the Networking config section caused a segfault. It turns out that in pre-7.0 systems if you do getenv("amd_enable=YES") it will return the setting of the environment variable "amd_enable" but now it returns NULL. I think I found the places where sysinstall was potentially relying on that old behavior. Fix is to make a copy of the string to be used for the getenv(3) call, look for a '=' character in it, and replace it with '\0' if one is found. Stuck to sysinstall's typical coding standards despite urges to do otherwise. PR: 117642 MFC after: 2 days Revision Changes Path 1.243 +6 -1 src/usr.sbin/sysinstall/config.c 1.48 +8 -4 src/usr.sbin/sysinstall/dmenu.c