mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
SAE: Check sta pointer more consistently in testing code
send_auth_reply() could be called with sta == NULL in certain error conditions. While that is not applicable for this special test functionality for SAE, the inconsistent checks for the sta pointer could result in warnings from static analyzers. Address this by explicitly checking the sta pointer here. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
15d63c6043
commit
7dcc5f7feb
@ -383,7 +383,7 @@ static int send_auth_reply(struct hostapd_data *hapd, struct sta_info *sta,
|
||||
#ifdef CONFIG_SAE
|
||||
if (hapd->conf->sae_confirm_immediate == 2 &&
|
||||
auth_alg == WLAN_AUTH_SAE) {
|
||||
if (auth_transaction == 1 &&
|
||||
if (auth_transaction == 1 && sta &&
|
||||
(resp == WLAN_STATUS_SUCCESS ||
|
||||
resp == WLAN_STATUS_SAE_HASH_TO_ELEMENT)) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
|
Loading…
Reference in New Issue
Block a user