mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-12-03 12:48:35 -05:00
Make last_scan_res update easier for static analyzers
The check based on last_scan_res_used is sufficient for making sure that last_scan_res is allocated. However, it is a bit too complex for static analyzers to notice, so add an explicit check to avoid bogus reports. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
d06e9ac5f5
commit
ece88f7697
@ -674,6 +674,7 @@ void wpa_bss_update_scan_res(struct wpa_supplicant *wpa_s,
|
|||||||
wpa_s->last_scan_res_size = siz;
|
wpa_s->last_scan_res_size = siz;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (wpa_s->last_scan_res)
|
||||||
wpa_s->last_scan_res[wpa_s->last_scan_res_used++] = bss;
|
wpa_s->last_scan_res[wpa_s->last_scan_res_used++] = bss;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user