diff options
author | Jouni Malinen <jouni@qca.qualcomm.com> | 2011-10-28 09:03:45 (GMT) |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2011-10-28 09:13:56 (GMT) |
commit | d28b43f66f91c28c9fdefdfc17f006a418462bc4 (patch) | |
tree | 7586adb3eae52f6642f33e0c7c83972984b1082a /src/ap/wpa_auth_glue.c | |
parent | 08f6ab76a569db0fa189a81951927b7e96627d3c (diff) | |
download | hostap-d28b43f66f91c28c9fdefdfc17f006a418462bc4.zip hostap-d28b43f66f91c28c9fdefdfc17f006a418462bc4.tar.gz hostap-d28b43f66f91c28c9fdefdfc17f006a418462bc4.tar.bz2 |
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.
Diffstat (limited to 'src/ap/wpa_auth_glue.c')
-rw-r--r-- | src/ap/wpa_auth_glue.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ap/wpa_auth_glue.c b/src/ap/wpa_auth_glue.c index 7b60bc7..af239c8 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; |