Clear beacon_data before usage

struct beacon_data contains a lot of pointers. Make sure it gets cleared
to zero if hostapd_build_beacon_data() gets called from a path that does
not clear the structure first.

Signed-hostap: Janusz Dziedzic <janusz.dziedzic@tieto.com>
This commit is contained in:
Janusz Dziedzic 2013-11-22 21:21:25 +01:00 committed by Jouni Malinen
parent 982189632f
commit 80ed037f00

View file

@ -2049,6 +2049,7 @@ static int hostapd_build_beacon_data(struct hostapd_iface *iface,
int ret; int ret;
struct hostapd_data *hapd = iface->bss[0]; struct hostapd_data *hapd = iface->bss[0];
os_memset(beacon, 0, sizeof(*beacon));
ret = ieee802_11_build_ap_params(hapd, &params); ret = ieee802_11_build_ap_params(hapd, &params);
if (ret < 0) if (ret < 0)
return ret; return ret;