aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2016-08-19 13:26:48 (GMT)
committerJouni Malinen <j@w1.fi>2016-08-19 13:26:48 (GMT)
commit30e0745bf7e7c302d5e0977c805b6f07ac2f3d2b (patch)
tree33c0d7845d86973008c552a993129d9d3d5b58ef
parent1f3b8b4edbccfdd60cc28d0f11080eb7181c28b9 (diff)
downloadhostap-30e0745bf7e7c302d5e0977c805b6f07ac2f3d2b.zip
hostap-30e0745bf7e7c302d5e0977c805b6f07ac2f3d2b.tar.gz
hostap-30e0745bf7e7c302d5e0977c805b6f07ac2f3d2b.tar.bz2
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 <jouni@qca.qualcomm.com>
-rw-r--r--hostapd/ctrl_iface.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
index 4e7b58e..5f3d6bd 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;