hostapd: Check that EVENT_ASSOC data is present before using it
While hostapd should not really receive the EVENT_ASSOC message for IBSS, driver_nl80211.c could potentially generate that if something external forces the interface into IBSS mode and the IBSS case does not provide the struct assoc_info data. Avoid the potential NULL pointer dereference by explicitly verifying for the event data to be present. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
1cc0d6a0eb
commit
04a258e7c5
1 changed files with 2 additions and 0 deletions
|
@ -1044,6 +1044,8 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
|||
data->eapol_rx.data_len);
|
||||
break;
|
||||
case EVENT_ASSOC:
|
||||
if (!data)
|
||||
return;
|
||||
hostapd_notif_assoc(hapd, data->assoc_info.addr,
|
||||
data->assoc_info.req_ies,
|
||||
data->assoc_info.req_ies_len,
|
||||
|
|
Loading…
Reference in a new issue