aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/rtl8188ee/trx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2014-01-23 10:20:29 -0500
committerJohannes Berg <johannes.berg@intel.com>2014-02-04 15:58:07 -0500
commitd8ca16db6bb23d03fcb794df44bae64ae976f27c (patch)
treef577a829374c0f9daba8bf70e1ea3d6ac107089c /drivers/net/wireless/rtlwifi/rtl8188ee/trx.c
parentae811e21df28deb4c2adab0a47fc3da4f56d777b (diff)
mac80211: add length check in ieee80211_is_robust_mgmt_frame()
A few places weren't checking that the frame passed to the function actually has enough data even though the function clearly documents it must have a payload byte. Make this safer by changing the function to take an skb and checking the length inside. The old version is preserved for now as the rtl* drivers use it and don't have a correct skb. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/rtl8188ee/trx.c')
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8188ee/trx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8188ee/trx.c b/drivers/net/wireless/rtlwifi/rtl8188ee/trx.c
index aece6c9cccf1..27ace3054d56 100644
--- a/drivers/net/wireless/rtlwifi/rtl8188ee/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8188ee/trx.c
@@ -452,7 +452,7 @@ bool rtl88ee_rx_query_desc(struct ieee80211_hw *hw,
452 /* During testing, hdr was NULL */ 452 /* During testing, hdr was NULL */
453 return false; 453 return false;
454 } 454 }
455 if ((ieee80211_is_robust_mgmt_frame(hdr)) && 455 if ((_ieee80211_is_robust_mgmt_frame(hdr)) &&
456 (ieee80211_has_protected(hdr->frame_control))) 456 (ieee80211_has_protected(hdr->frame_control)))
457 rx_status->flag &= ~RX_FLAG_DECRYPTED; 457 rx_status->flag &= ~RX_FLAG_DECRYPTED;
458 else 458 else