]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix WPA authenticator configuration to not leave uninitialized fields
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 28 Oct 2011 09:03:45 +0000 (12:03 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 28 Oct 2011 09:13:56 +0000 (12:13 +0300)
hostapd_wpa_auth_conf() is called on uninitialized memory and the
conditional blocks in this function may leave some fields into
uninitialized state. This can result in unexpected behavior elsewhere
since some of the variables may be used without matching #ifdef
blocks. Fix this by zeroing the memory.

src/ap/wpa_auth_glue.c

index 7b60bc780bb9f415ac4592bf39cdf22e0a5abfe8..af239c8e59a4f07b65a33b2938f46590c372015d 100644 (file)
@@ -34,6 +34,7 @@
 static void hostapd_wpa_auth_conf(struct hostapd_bss_config *conf,
                                  struct wpa_auth_config *wconf)
 {
+       os_memset(wconf, 0, sizeof(*wconf));
        wconf->wpa = conf->wpa;
        wconf->wpa_key_mgmt = conf->wpa_key_mgmt;
        wconf->wpa_pairwise = conf->wpa_pairwise;