⬢ DragonFlyBSD Kernel Audit
DF-3927 / fix.diff
← back to finding ↓ download raw
--- a/sys/dev/netif/bwn/siba/siba_core.c
+++ b/sys/dev/netif/bwn/siba/siba_core.c
@@ -2128,8 +2128,9 @@
 	} else {
 		tmp = siba_read_4_sub(sd, SIBA_TPS);
 		tmp &= SIBA_TPS_BPFLAG;
-		siba_write_4_sub(psd, SIBA_INTR_MASK,
-		    siba_read_4_sub(psd, SIBA_INTR_MASK) | (1 << tmp));
+		if (tmp < 32)
+			siba_write_4_sub(psd, SIBA_INTR_MASK,
+			    siba_read_4_sub(psd, SIBA_INTR_MASK) | (1u << tmp));
 	}
 
 	/* setup PCIcore */