diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-03-27 09:31:53 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-04-08 03:16:57 -0400 |
commit | 1946bed95707ef75d85e94ebe106ce7a119ca831 (patch) | |
tree | a0be226b4fed65ac75344222e70c2cdddb5b0888 /net/mac80211/util.c | |
parent | 1cd8e88e17729f57a9c7f751103e522596bb5de2 (diff) |
mac80211: check ERP info 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 0f7d1c20f8ac..4839dec5c9ac 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -780,8 +780,10 @@ u32 ieee802_11_parse_elems_crc(u8 *start, size_t len, | |||
780 | elems->rsn_len = elen; | 780 | elems->rsn_len = elen; |
781 | break; | 781 | break; |
782 | case WLAN_EID_ERP_INFO: | 782 | case WLAN_EID_ERP_INFO: |
783 | elems->erp_info = pos; | 783 | if (elen >= 1) |
784 | elems->erp_info_len = elen; | 784 | elems->erp_info = pos; |
785 | else | ||
786 | elem_parse_failed = true; | ||
785 | break; | 787 | break; |
786 | case WLAN_EID_EXT_SUPP_RATES: | 788 | case WLAN_EID_EXT_SUPP_RATES: |
787 | elems->ext_supp_rates = pos; | 789 | elems->ext_supp_rates = pos; |