mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-17 18:34:03 -05:00
WNM: Use cleaner way of generating pointer to a field (CID 68099)
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>
This commit is contained in:
parent
062833c67c
commit
da995b2e11
@ -376,10 +376,9 @@ int ieee802_11_rx_wnm_action_ap(struct hostapd_data *hapd,
|
||||
if (len < IEEE80211_HDRLEN + 2)
|
||||
return -1;
|
||||
|
||||
payload = &mgmt->u.action.category;
|
||||
payload++;
|
||||
payload = ((const u8 *) mgmt) + IEEE80211_HDRLEN + 1;
|
||||
action = *payload++;
|
||||
plen = (((const u8 *) mgmt) + len) - payload;
|
||||
plen = len - IEEE80211_HDRLEN - 2;
|
||||
|
||||
switch (action) {
|
||||
case WNM_BSS_TRANS_MGMT_QUERY:
|
||||
|
Loading…
Reference in New Issue
Block a user