DragonFlyBSD Kernel Audit
DF-2540 / fix.diff
← back to finding ↓ download raw
diff --git a/sys/dev/misc/amdsbwd/amdsbwd.c b/sys/dev/misc/amdsbwd/amdsbwd.c
--- a/sys/dev/misc/amdsbwd/amdsbwd.c
+++ b/sys/dev/misc/amdsbwd/amdsbwd.c
@@ -214,7 +214,7 @@
 	unsigned int timeout;
 	struct amdsbwd_softc *sc = arg;
 
-	timeout = (period * 1000) / sc->ms_per_tick;
+	timeout = ((int64_t)period * 1000) / sc->ms_per_tick;
 	if (timeout > sc->max_ticks)
 		timeout = sc->max_ticks;
 	if (timeout != sc->timeout) {