⬢ DragonFlyBSD Kernel Audit
DF-2403 / fix.diff
← back to finding ↓ download raw
1
2
3
4
5
6
7
8
9
# DF-2403 fix (authored post-verification; not applied to sys/)
--- a/sys/dev/apple/smc/smc_sysctl.c
+++ b/sys/dev/apple/smc/smc_sysctl.c
@@ -49,6 +49,7 @@ apple_smc_mb_sysctl_fanid(SYSCTL_HANDLER_ARGS)
 	char *desc;
 
+	memset(buf, 0, sizeof(buf));	/* backends may short-fill */
 	desc = apple_smc_fan_getstring(dev, ASMC_KEY_FANID, fan,
 	    buf, sizeof(buf));