aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-09-04 18:50:12 (GMT)
committerJouni Malinen <j@w1.fi>2010-09-05 14:36:11 (GMT)
commit51f5df11e02fb8b2d971770df7466b438095abaf (patch)
tree38d8b02ef654a5f932bd6f38621c5ef17eeb7474
parenta0d6004d3392ec54a88334cee097af08e62c5167 (diff)
downloadhostap-07-51f5df11e02fb8b2d971770df7466b438095abaf.zip
hostap-07-51f5df11e02fb8b2d971770df7466b438095abaf.tar.gz
hostap-07-51f5df11e02fb8b2d971770df7466b438095abaf.tar.bz2
wpa_supplicant AP: Make sure deauth/disassoc event is valid
Verify that the driver wrapper is using a valid deauth/disassoc event before dereferencing the addr pointer. The address is required to be set in AP mode, but it is safer to verify this here than to trust on all driver wrappers doing the correct thing. (cherry picked from commit 7f5420691e45cf1f1facd3baafa58c324819a868)
-rw-r--r--wpa_supplicant/events.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 6328d78..85dcfb2 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -1589,7 +1589,7 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
case EVENT_DISASSOC:
wpa_printf(MSG_DEBUG, "Disassociation notification");
#ifdef CONFIG_AP
- if (wpa_s->ap_iface && data) {
+ if (wpa_s->ap_iface && data && data->disassoc_info.addr) {
hostapd_notif_disassoc(wpa_s->ap_iface->bss[0],
data->disassoc_info.addr);
break;
@@ -1607,7 +1607,7 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
reason_code = data->deauth_info.reason_code;
}
#ifdef CONFIG_AP
- if (wpa_s->ap_iface && data) {
+ if (wpa_s->ap_iface && data && data->deauth_info.addr) {
hostapd_notif_disassoc(wpa_s->ap_iface->bss[0],
data->deauth_info.addr);
break;