CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2026/09/07 18:47:00
Modified files:
sys/arch/amd64/amd64: machdep.c
sys/arch/i386/i386: bios.c
Log message:
avoid an uninitialised stack read
it is possible for bios_sysctl() to be called with namelen=0:
sys_sysctl() name={ CTL_MACHDEP, CPU_BIOS }, namelen=2
cpu_sysctl() name={ CPU_BIOS }, namelen=1
bios_sysctl() name={}, namelen=0
if name[0] was 2 (BIOS_DISKINFO) the function would not return ENOTDIR
as intended
found by and diff from Johann Hoepfner, ok deraadt@