]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
HS 2.0: Allocate enough buffer for HS 2.0 Indication element for scan
authorJouni Malinen <jouni@codeaurora.org>
Fri, 7 Dec 2018 23:11:44 +0000 (01:11 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 8 Dec 2018 12:06:58 +0000 (14:06 +0200)
The HS 2.0 Indication element can be up to 9 octets in length, so add
two more octets to the minimum extra_ie buffer size for scanning.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
wpa_supplicant/scan.c

index be328dedb7ad69cdce6920e11b9b3f6e95c2ecf2..52b521f93da0851d1b2dde569a7c60ed496f93ce 100644 (file)
@@ -581,7 +581,7 @@ static struct wpabuf * wpa_supplicant_extra_ies(struct wpa_supplicant *wpa_s)
 #endif /* CONFIG_WPS */
 
 #ifdef CONFIG_HS20
-       if (wpa_s->conf->hs20 && wpabuf_resize(&extra_ie, 7) == 0)
+       if (wpa_s->conf->hs20 && wpabuf_resize(&extra_ie, 9) == 0)
                wpas_hs20_add_indication(extra_ie, -1, 0);
 #endif /* CONFIG_HS20 */