From: Jouni Malinen Date: Tue, 26 Jan 2021 22:09:49 +0000 (+0200) Subject: wlantest: Fix broadcast EAPOL-Key frame handling X-Git-Tag: hostap_2_10~511 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32360ad498202301c2c47ae2071f9938acb7c797;p=thirdparty%2Fhostap.git wlantest: Fix broadcast EAPOL-Key frame handling This resulted in an attempt to dereference a NULL pointer since sta_addr is not known in this type of a case. Signed-off-by: Jouni Malinen --- diff --git a/wlantest/rx_eapol.c b/wlantest/rx_eapol.c index eaf97c3e8..d5e10debf 100644 --- a/wlantest/rx_eapol.c +++ b/wlantest/rx_eapol.c @@ -1056,7 +1056,10 @@ static void rx_data_eapol_key(struct wlantest *wt, const u8 *bssid, bss = bss_get(wt, bssid); if (bss) { - sta = sta_get(bss, sta_addr); + if (sta_addr) + sta = sta_get(bss, sta_addr); + else + sta = NULL; if (sta) mic_len = wpa_mic_len(sta->key_mgmt, PMK_LEN); }