]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
FILS: Fix FILS Realm Information ANQP-element construction
authorJouni Malinen <j@w1.fi>
Mon, 2 Jan 2017 22:15:59 +0000 (00:15 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 3 Jan 2017 13:18:30 +0000 (15:18 +0200)
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 <j@w1.fi>
src/ap/gas_serv.c

index 7595281d0fd6109bd246a2cf3a0b6a4495e43860..3878ce6d80d5b5dcf28973f4cf7eb5298f881adc 100644 (file)
@@ -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--;
                }
        }
 }