mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 08:48:31 -05:00
FILS: Clean up HLP resize check
The "!wpabuf_resize(...) == 0" condition does not make any sense. It happens to work, but this is really supposed to simple check with wpabuf_resize() returns non-zero and "wpabuf_resize(...)" is the cleanest way of doing so. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
16f91791da
commit
0d6dc6830c
@ -281,8 +281,8 @@ static void fils_dhcp_handler(int sd, void *eloop_ctx, void *sock_ctx)
|
|||||||
} else {
|
} else {
|
||||||
wpabuf_put_data(resp, pos, end - pos);
|
wpabuf_put_data(resp, pos, end - pos);
|
||||||
}
|
}
|
||||||
if (!wpabuf_resize(&sta->fils_hlp_resp, wpabuf_len(resp) +
|
if (wpabuf_resize(&sta->fils_hlp_resp, wpabuf_len(resp) +
|
||||||
2 * wpabuf_len(resp) / 255 + 100) == 0) {
|
2 * wpabuf_len(resp) / 255 + 100)) {
|
||||||
wpabuf_free(resp);
|
wpabuf_free(resp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user