You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
mt76: mt7915: fix an off-by-one bound check
[ Upstream commit d45dac0732 ]
The bounds check on datalen is off-by-one, so fix it.
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ea7f8803a3
commit
16c2dd0ab5
@@ -830,7 +830,7 @@ static void mt7915_check_he_obss_narrow_bw_ru_iter(struct wiphy *wiphy,
|
||||
|
||||
elem = ieee80211_bss_get_elem(bss, WLAN_EID_EXT_CAPABILITY);
|
||||
|
||||
if (!elem || elem->datalen < 10 ||
|
||||
if (!elem || elem->datalen <= 10 ||
|
||||
!(elem->data[10] &
|
||||
WLAN_EXT_CAPA10_OBSS_NARROW_BW_RU_TOLERANCE_SUPPORT))
|
||||
data->tolerated = false;
|
||||
|
||||
Reference in New Issue
Block a user