mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
Fix sched_scan filter setting for max_match_sets == 0
The previous implementation was trying to add the first SSID to a zero-length array. Avoid this with an explicit validation of the array length. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
fb67eec6f8
commit
fcd1684787
@ -755,7 +755,8 @@ int wpa_supplicant_req_sched_scan(struct wpa_supplicant *wpa_s)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (params.filter_ssids && ssid->ssid && ssid->ssid_len) {
|
||||
if (params.num_filter_ssids < wpa_s->max_match_sets &&
|
||||
params.filter_ssids && ssid->ssid && ssid->ssid_len) {
|
||||
wpa_dbg(wpa_s, MSG_DEBUG, "add to filter ssid: %s",
|
||||
wpa_ssid_txt(ssid->ssid, ssid->ssid_len));
|
||||
os_memcpy(params.filter_ssids[params.num_filter_ssids].ssid,
|
||||
|
Loading…
Reference in New Issue
Block a user