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 <j@w1.fi>
This commit is contained in:
Jouni Malinen 2017-01-03 00:15:59 +02:00
parent 76196ddb2b
commit aeff0645d2

View file

@ -580,6 +580,7 @@ static void anqp_add_fils_realm_info(struct hostapd_data *hapd,
if (count == 0) if (count == 0)
break; break;
wpabuf_put_data(buf, realm->hash, 2); wpabuf_put_data(buf, realm->hash, 2);
count--;
} }
} }
} }