]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
More consistent sta pointer checks in handle_assoc()
authorJouni Malinen <j@w1.fi>
Sat, 16 Dec 2023 22:12:59 +0000 (00:12 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 16 Dec 2023 22:12:59 +0000 (00:12 +0200)
Verify that sta is not NULL before calling
hostapd_process_assoc_ml_info() that references this parameter. In
theory, sta might be NULL here if addition of the STA entry failed in
the 60 GHz case.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/ap/ieee802_11.c

index fe5084c26867e0d22c112ce413f8fd4660a61bb0..8fb6ce5d3dcb6b4a27c7ce52396fd1c1e2545e44 100644 (file)
@@ -5582,7 +5582,9 @@ static void handle_assoc(struct hostapd_data *hapd,
         *    issues with processing other non-Data Class 3 frames during this
         *    window.
         */
-       hostapd_process_assoc_ml_info(hapd, sta, pos, left, reassoc, resp);
+       if (sta)
+               hostapd_process_assoc_ml_info(hapd, sta, pos, left, reassoc,
+                                             resp);
 
        if (resp == WLAN_STATUS_SUCCESS && sta &&
            add_associated_sta(hapd, sta, reassoc))