From: Jouni Malinen Date: Mon, 2 Jan 2017 22:15:59 +0000 (+0200) Subject: FILS: Fix FILS Realm Information ANQP-element construction X-Git-Tag: hostap_2_7~1848 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aeff0645d24bb12bc82d2c4db6743354c545c4fa;p=thirdparty%2Fhostap.git 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 --- 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--; } } }