From: Benjamin Berg Date: Fri, 14 Jun 2024 08:13:43 +0000 (+0200) Subject: MLD: Ensure link_bssid array has space for sentinel X-Git-Tag: hostap_2_11~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7bcede06e0b3c08e18b7562bbd941fd43eb82e12;p=thirdparty%2Fhostap.git MLD: Ensure link_bssid array has space for sentinel The consumer of the link_bssid array assumes it is a NULL terminated array of BSSIDs. As such, add one to the maximum number of links to ensure that there is always a sentinel value. Fixes: 5af986c75af4 ("MLD: Also mark links as failed after association failure") Signed-off-by: Benjamin Berg --- diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 952816db2..d45e7925d 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -5637,7 +5637,7 @@ static void wpas_event_assoc_reject(struct wpa_supplicant *wpa_s, const u8 *bssid = data->assoc_reject.bssid; struct ieee802_11_elems elems; struct ml_sta_link_info ml_info[MAX_NUM_MLD_LINKS]; - const u8 *link_bssids[MAX_NUM_MLD_LINKS]; + const u8 *link_bssids[MAX_NUM_MLD_LINKS + 1]; #ifdef CONFIG_MBO struct wpa_bss *reject_bss; #endif /* CONFIG_MBO */