From d28b43f66f91c28c9fdefdfc17f006a418462bc4 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 28 Oct 2011 12:03:45 +0300 Subject: [PATCH] Fix WPA authenticator configuration to not leave uninitialized fields 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ap/wpa_auth_glue.c b/src/ap/wpa_auth_glue.c index 7b60bc780..af239c8e5 100644 --- a/src/ap/wpa_auth_glue.c +++ b/src/ap/wpa_auth_glue.c @@ -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;