From aeff0645d24bb12bc82d2c4db6743354c545c4fa Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 3 Jan 2017 00:15:59 +0200 Subject: [PATCH] FILS: Fix FILS Realm Information ANQP-element construction The loop to add hash values was supposed to be limited to at most 10000 values, but the count variable was not being decremented in the loop. Fix this by decrementing counting for each iteration. This fixes ANQP-element format in the unlikely case of there being more than 10000 configuration realms. Signed-off-by: Jouni Malinen --- src/ap/gas_serv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ap/gas_serv.c b/src/ap/gas_serv.c index 7595281d0..3878ce6d8 100644 --- a/src/ap/gas_serv.c +++ b/src/ap/gas_serv.c @@ -580,6 +580,7 @@ static void anqp_add_fils_realm_info(struct hostapd_data *hapd, if (count == 0) break; wpabuf_put_data(buf, realm->hash, 2); + count--; } } }