aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wnm_sta.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-06-12 20:33:33 (GMT)
committerJouni Malinen <j@w1.fi>2014-06-12 21:27:15 (GMT)
commit2703fb4ad92f9114e76ffc5d3015ec30cc5e1448 (patch)
treea81ff6da55659ce10b54d8f09af2691ef0dc6d81 /wpa_supplicant/wnm_sta.c
parentda995b2e11f10c6e643d0a2ce43f24e81dd78dae (diff)
downloadhostap-2703fb4ad92f9114e76ffc5d3015ec30cc5e1448.zip
hostap-2703fb4ad92f9114e76ffc5d3015ec30cc5e1448.tar.gz
hostap-2703fb4ad92f9114e76ffc5d3015ec30cc5e1448.tar.bz2
WNM: Use cleaner way of generating pointer to a field (CID 68100)
The Action code field is in a fixed location, so the IEEE80211_HDRLEN can be used here to clean up bounds checking to avoid false reports from static analyzer. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/wnm_sta.c')
-rw-r--r--wpa_supplicant/wnm_sta.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c
index e395ef1..4a792c4 100644
--- a/wpa_supplicant/wnm_sta.c
+++ b/wpa_supplicant/wnm_sta.c
@@ -921,8 +921,7 @@ void ieee802_11_rx_wnm_action(struct wpa_supplicant *wpa_s,
if (len < IEEE80211_HDRLEN + 2)
return;
- pos = &mgmt->u.action.category;
- pos++;
+ pos = ((const u8 *) mgmt) + IEEE80211_HDRLEN + 1;
act = *pos++;
end = ((const u8 *) mgmt) + len;