From: Jouni Malinen Date: Sun, 22 Mar 2020 16:51:41 +0000 (+0200) Subject: Limit scan frequency list to 100 entries X-Git-Tag: hostap_2_10~1579 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b967b5e859149d53cb32bc0b37a6ef60a8b1f554;p=thirdparty%2Fhostap.git Limit scan frequency list to 100 entries There is no real use case for the scan to be requested on more than 100 channels individually. To avoid excessively long lists with invalid configuration, use 100 entry limit for the list before dropping to the fallback scan-all-channels option. Signed-off-by: Jouni Malinen --- diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index ad9d77af8..b47573094 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -1109,7 +1109,9 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx) tssid = tssid->next) { if (wpas_network_disabled(wpa_s, tssid)) continue; - if ((params.freqs || !freqs_set) && tssid->scan_freq) { + if (((params.freqs || !freqs_set) && + tssid->scan_freq) && + int_array_len(params.freqs) < 100) { int_array_concat(¶ms.freqs, tssid->scan_freq); } else {