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>
This commit is contained in:
parent
da995b2e11
commit
2703fb4ad9
1 changed files with 1 additions and 2 deletions
|
@ -921,8 +921,7 @@ void ieee802_11_rx_wnm_action(struct wpa_supplicant *wpa_s,
|
||||||
if (len < IEEE80211_HDRLEN + 2)
|
if (len < IEEE80211_HDRLEN + 2)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
pos = &mgmt->u.action.category;
|
pos = ((const u8 *) mgmt) + IEEE80211_HDRLEN + 1;
|
||||||
pos++;
|
|
||||||
act = *pos++;
|
act = *pos++;
|
||||||
end = ((const u8 *) mgmt) + len;
|
end = ((const u8 *) mgmt) + len;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue