diff options
author | Jouni Malinen <j@w1.fi> | 2018-06-05 11:40:18 (GMT) |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2018-06-05 17:16:37 (GMT) |
commit | 88bf44be424c678cb2d153a8b7875134aa2db817 (patch) | |
tree | 710815c15cb0c46888fc5b92f84df3aa77a7b697 /wpa_supplicant/wpa_supplicant.c | |
parent | 661afb2edd016932f10b39065745434c6097fd16 (diff) | |
download | hostap-88bf44be424c678cb2d153a8b7875134aa2db817.zip hostap-88bf44be424c678cb2d153a8b7875134aa2db817.tar.gz hostap-88bf44be424c678cb2d153a8b7875134aa2db817.tar.bz2 |
FT: Fix potential NULL pointer dereference in MDE addition
The bss variable in this function might be NULL, so make the FT MDE
addition case conditional on a BSS entry being available.
Fixes: 3dc3afe298f0 ("FT: Add MDE to assoc request IEs in connect params")
Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/wpa_supplicant.c')
-rw-r--r-- | wpa_supplicant/wpa_supplicant.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 11d6b20..185a8d5 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -2748,7 +2748,7 @@ static u8 * wpas_populate_assoc_ies( * Add MDIE under these conditions: the network profile allows FT, * the AP supports FT, and the mobility domain ID matches. */ - if (wpa_key_mgmt_ft(wpa_sm_get_key_mgmt(wpa_s->wpa))) { + if (bss && wpa_key_mgmt_ft(wpa_sm_get_key_mgmt(wpa_s->wpa))) { const u8 *mdie = wpa_bss_get_ie(bss, WLAN_EID_MOBILITY_DOMAIN); if (mdie && mdie[1] >= MOBILITY_DOMAIN_ID_LEN) { |