From: Jouni Malinen Date: Fri, 19 Aug 2016 13:26:48 +0000 (+0300) Subject: Fix TRACK_STA_LIST before BSS enabled X-Git-Tag: hostap_2_6~105 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30e0745bf7e7c302d5e0977c805b6f07ac2f3d2b;p=thirdparty%2Fhostap.git Fix TRACK_STA_LIST before BSS enabled This hostapd control interface command could hit a NULL pointer dereference if issued before the BSS was enabled. Signed-off-by: Jouni Malinen --- diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c index 4e7b58ec5..5f3d6bd70 100644 --- a/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c @@ -2040,6 +2040,9 @@ static int hostapd_ctrl_iface_track_sta_list(struct hostapd_data *hapd, struct hostapd_sta_info *info; struct os_reltime now; + if (!iface->num_sta_seen) + return 0; + sta_track_expire(iface, 0); pos = buf;