mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt7603: add more checks to avoid dereferencing invalid pointers in wcid lookup
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -363,7 +363,13 @@ mt7603_rx_get_wcid(struct mt7603_dev *dev, u8 idx, bool unicast)
|
||||
if (unicast || !wcid)
|
||||
return wcid;
|
||||
|
||||
if (!wcid->sta)
|
||||
return NULL;
|
||||
|
||||
sta = container_of(wcid, struct mt7603_sta, wcid);
|
||||
if (!sta->vif)
|
||||
return NULL;
|
||||
|
||||
return &sta->vif->wcid;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user