Clear beacon_data before usage
authorJanusz Dziedzic <janusz.dziedzic@tieto.com>
Fri, 22 Nov 2013 20:21:25 +0000 (21:21 +0100)
committerJouni Malinen <j@w1.fi>
Fri, 22 Nov 2013 21:21:43 +0000 (23:21 +0200)
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>

src/ap/hostapd.c

index 69e8956..efaae85 100644 (file)
@@ -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, &params);
        if (ret < 0)
                return ret;