diff options
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; |