kensmith 2007-10-30 05:03:38 UTC
FreeBSD src repository
usr.sbin/sysinstall config.c dmenu.c
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.
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