mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
Simplify eapol_sm_get_mib() result handling
This function cannot return negative value, so no need to check for that. If there is not enough room in the buffer or if something unexpected happens, 0 is returned. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
70d29ec946
commit
5ac73acf12
@ -7021,13 +7021,9 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
|
||||
} else if (os_strcmp(buf, "MIB") == 0) {
|
||||
reply_len = wpa_sm_get_mib(wpa_s->wpa, reply, reply_size);
|
||||
if (reply_len >= 0) {
|
||||
int res;
|
||||
res = eapol_sm_get_mib(wpa_s->eapol, reply + reply_len,
|
||||
reply_size - reply_len);
|
||||
if (res < 0)
|
||||
reply_len = -1;
|
||||
else
|
||||
reply_len += res;
|
||||
reply_len += eapol_sm_get_mib(wpa_s->eapol,
|
||||
reply + reply_len,
|
||||
reply_size - reply_len);
|
||||
}
|
||||
} else if (os_strncmp(buf, "STATUS", 6) == 0) {
|
||||
reply_len = wpa_supplicant_ctrl_iface_status(
|
||||
|
Loading…
Reference in New Issue
Block a user