[PATCH] wpa_s: Fix a critical never-ending loop

Tomasz Bursztyka tomasz.bursztyka
Mon Dec 9 04:47:55 PST 2013


commit 202dec2a94695a696236ee5a2ad1be0905ccea14 has introduced a never
ending loop. This patch fixes it: so it loops on all interfaces until it
hits a NULL pointer so it can leave the loop.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka at linux.intel.com>
---

 wpa_supplicant/wpa_supplicant.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index e8bca8a..2d6272b 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -2905,6 +2905,8 @@ static struct wpa_radio * radio_add_interface(struct wpa_supplicant *wpa_s,
 			dl_list_add(&radio->ifaces, &wpa_s->radio_list);
 			return radio;
 		}
+
+		iface = iface->next;
 	}
 
 	wpa_printf(MSG_DEBUG, "Add interface %s to a new radio %s",
-- 
1.8.4.4




More information about the Hostap mailing list