The space following the BSSID was not skipped properly if the following
parameter started with the "hs20:" prefix. For other cases, atoi() ended
up ignoring the space, but it is cleaner to skip it anyway for all
cases.
Signed-off-by: Jouni Malinen <j@w1.fi>
if (used < 0)
return -1;
pos = dst + used;
+ if (*pos == ' ')
+ pos++;
while (num_id < MAX_ANQP_INFO_ID) {
if (os_strncmp(pos, "hs20:", 5) == 0) {
#ifdef CONFIG_HS20
if (used < 0)
return -1;
pos = dst + used;
+ if (*pos == ' ')
+ pos++;
for (;;) {
int num = atoi(pos);
if (num <= 0 || num > 31)