summaryrefslogtreecommitdiffstats
path: root/net/mac80211/util.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-03-27 14:30:12 +0100
committerJohannes Berg <johannes.berg@intel.com>2013-04-08 09:16:56 +0200
commit1cd8e88e17729f57a9c7f751103e522596bb5de2 (patch)
treec20e4a7bed65480cea84f6a38bb4d0d44dd115f0 /net/mac80211/util.c
parenta6dfba841c4d38312115dc6b08d86cc496af7e88 (diff)
mac80211: check DSSS params IE length in parser
It's always just one byte, so check for that and remove the length field from the parser struct. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r--net/mac80211/util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 2708b270e94..0f7d1c20f8a 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -739,8 +739,10 @@ u32 ieee802_11_parse_elems_crc(u8 *start, size_t len,
elems->supp_rates_len = elen;
break;
case WLAN_EID_DS_PARAMS:
- elems->ds_params = pos;
- elems->ds_params_len = elen;
+ if (elen >= 1)
+ elems->ds_params = pos;
+ else
+ elem_parse_failed = true;
break;
case WLAN_EID_TIM:
if (elen >= sizeof(struct ieee80211_tim_ie)) {