mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
WNM: Skip os_memcpy in wnmtfs_ie is NULL
It is cleaner to skip the memcpy call instead of trusting on the length parameter being 0 in this case. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
835822d404
commit
a8e93a1a01
@ -132,7 +132,8 @@ static int ieee802_11_send_wnmsleep_resp(struct hostapd_data *hapd,
|
||||
os_memcpy(pos, &wnmsleep_ie, wnmsleep_ie_len);
|
||||
/* copy TFS IE here */
|
||||
pos += wnmsleep_ie_len;
|
||||
os_memcpy(pos, wnmtfs_ie, wnmtfs_ie_len);
|
||||
if (wnmtfs_ie)
|
||||
os_memcpy(pos, wnmtfs_ie, wnmtfs_ie_len);
|
||||
|
||||
len = 1 + sizeof(mgmt->u.action.u.wnm_sleep_resp) + gtk_elem_len +
|
||||
igtk_elem_len + wnmsleep_ie_len + wnmtfs_ie_len;
|
||||
|
Loading…
Reference in New Issue
Block a user