From 80ed037f00d90b14d26c581387d908a945eda04e Mon Sep 17 00:00:00 2001 From: Janusz Dziedzic Date: Fri, 22 Nov 2013 21:21:25 +0100 Subject: [PATCH] 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 --- src/ap/hostapd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c index 69e895665..efaae8533 100644 --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c @@ -2049,6 +2049,7 @@ static int hostapd_build_beacon_data(struct hostapd_iface *iface, int ret; struct hostapd_data *hapd = iface->bss[0]; + os_memset(beacon, 0, sizeof(*beacon)); ret = ieee802_11_build_ap_params(hapd, ¶ms); if (ret < 0) return ret;