DragonFlyBSD Kernel Audit
DF-0087 / fix.diff
← back to finding ↓ download raw
diff --git a/kern/subr_unit.c b/kern/subr_unit.c
--- a/kern/subr_unit.c
+++ b/kern/subr_unit.c
@@ -254,7 +254,7 @@
 	uh->low = low;
 	uh->high = high;
 	uh->first = 0;
-	uh->last = 1 + (high - low);
+	uh->last = 1 + (u_int)(high - low);
 	check_unrhdr(uh, __LINE__);
 	return (uh);
 }