DragonFlyBSD Kernel Audit
DF-0173 / fix.diff
← back to finding ↓ download raw
diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c
--- a/sys/kern/subr_param.c
+++ b/sys/kern/subr_param.c
@@ -198,6 +198,8 @@
 {
 	hz = HZ_DEFAULT;
 	TUNABLE_INT_FETCH("kern.hz", &hz);
+	if (hz <= 0)
+		hz = HZ_DEFAULT;
 	stathz = hz + 1;
 	TUNABLE_INT_FETCH("kern.stathz", &stathz);
 	profhz = stathz;