cvs commit: src/usr.sbin/sysinstall config.c dmenu.c

[ Available lists | Index of cvs-all | Month of Oct 2007 | Week of 30 Oct 2007 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Ken Smith <kensmith@FreeBSD.org>
Date
30 Oct 2007 05:03:38
Subject
cvs commit: src/usr.sbin/sysinstall config.c dmenu.c
Message-ID
200710300503.l9U53cQZ017345@repoman.freebsd.org


[ Hide this part ]
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


Elapsed time: 0.156 seconds