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
1 changed files with 2 additions and 1 deletions
|
@ -132,6 +132,7 @@ static int ieee802_11_send_wnmsleep_resp(struct hostapd_data *hapd,
|
||||||
os_memcpy(pos, &wnmsleep_ie, wnmsleep_ie_len);
|
os_memcpy(pos, &wnmsleep_ie, wnmsleep_ie_len);
|
||||||
/* copy TFS IE here */
|
/* copy TFS IE here */
|
||||||
pos += wnmsleep_ie_len;
|
pos += wnmsleep_ie_len;
|
||||||
|
if (wnmtfs_ie)
|
||||||
os_memcpy(pos, wnmtfs_ie, wnmtfs_ie_len);
|
os_memcpy(pos, wnmtfs_ie, wnmtfs_ie_len);
|
||||||
|
|
||||||
len = 1 + sizeof(mgmt->u.action.u.wnm_sleep_resp) + gtk_elem_len +
|
len = 1 + sizeof(mgmt->u.action.u.wnm_sleep_resp) + gtk_elem_len +
|
||||||
|
|
Loading…
Reference in a new issue