mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 21:36:52 +00:00
mt76: mt7615: fix potential overflow on large shift
Fix the following static checker warning:
error: undefined (user controlled) shift '(((1))) << (c->omac_idx)'
Fixes: 402a695b1ae6 ("mt76: mt7615: fix CSA notification for DBDC")
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -411,6 +411,9 @@ mt7615_mcu_rx_csa_notify(struct mt7615_dev *dev, struct sk_buff *skb)
|
||||
|
||||
c = (struct mt7615_mcu_csa_notify *)skb->data;
|
||||
|
||||
if (c->omac_idx > EXT_BSSID_MAX)
|
||||
return;
|
||||
|
||||
if (ext_phy && ext_phy->omac_mask & BIT_ULL(c->omac_idx))
|
||||
mphy = dev->mt76.phy2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user