summaryrefslogtreecommitdiffstats
path: root/net/mac80211/parse.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--net/mac80211/parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/parse.c b/net/mac80211/parse.c
index 55e5497f89..055a60e909 100644
--- a/net/mac80211/parse.c
+++ b/net/mac80211/parse.c
@@ -111,7 +111,7 @@ ieee80211_parse_extension_element(u32 *crc,
if (params->mode < IEEE80211_CONN_MODE_HE)
break;
if (len >= sizeof(*elems->he_spr) &&
- len >= ieee80211_he_spr_size(data))
+ len >= ieee80211_he_spr_size(data) - 1)
elems->he_spr = data;
break;
case WLAN_EID_EXT_HE_6GHZ_CAPA: