diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-03-27 09:30:12 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-04-08 03:16:56 -0400 |
commit | 1cd8e88e17729f57a9c7f751103e522596bb5de2 (patch) | |
tree | c20e4a7bed65480cea84f6a38bb4d0d44dd115f0 /net/mac80211/util.c | |
parent | a6dfba841c4d38312115dc6b08d86cc496af7e88 (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.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 2708b270e944..0f7d1c20f8ac 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, | |||
739 | elems->supp_rates_len = elen; | 739 | elems->supp_rates_len = elen; |
740 | break; | 740 | break; |
741 | case WLAN_EID_DS_PARAMS: | 741 | case WLAN_EID_DS_PARAMS: |
742 | elems->ds_params = pos; | 742 | if (elen >= 1) |
743 | elems->ds_params_len = elen; | 743 | elems->ds_params = pos; |
744 | else | ||
745 | elem_parse_failed = true; | ||
744 | break; | 746 | break; |
745 | case WLAN_EID_TIM: | 747 | case WLAN_EID_TIM: |
746 | if (elen >= sizeof(struct ieee80211_tim_ie)) { | 748 | if (elen >= sizeof(struct ieee80211_tim_ie)) { |