diff mbox

Dont exceed scan ssid max size advertised by driver

Message ID 1467244527-38690-1-git-send-email-rpius@google.com
State Superseded
Headers show

Commit Message

Roshan Pius June 29, 2016, 11:55 p.m. UTC
Currently |wpa_set_scan_ssids| fully exhausts
|wpa_driver_scan_params.ssid| list when hidden network ID's
are provided via the control interface. This results in us
exceeding the max size for the list advertised by the driver when we add
the "wildcard" scan ssid entry. So, ensure that we leave space for one
more scan ssid entry in the list when we exit out of |wpa_set_scan_ssids|.

Signed-off-by: Roshan Pius <rpius@google.com>
---
 wpa_supplicant/scan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index 7a52826..8a29522 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -593,7 +593,7 @@  static void wpa_set_scan_ssids(struct wpa_supplicant *wpa_s,
 		if (j < params->num_ssids)
 			continue; /* already in the list */
 
-		if (params->num_ssids + 1 > max_ssids) {
+		if (params->num_ssids + 1 >= max_ssids) {
 			wpa_printf(MSG_DEBUG,
 				   "Over max scan SSIDs for manual request");
 			break;