From: Shivani Baranwal Date: Tue, 15 Oct 2024 06:13:14 +0000 (+0530) Subject: P2P2: Fix to check if sae_password is present X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b80b37910325393d7fe6f61bf644ee76c204f3e6;p=thirdparty%2Fhostap.git P2P2: Fix to check if sae_password is present Fix the check for whether sae_password is present. Instead of checking the static array's address which is always going to be true, verify that the string is not empty. Fixes: cf30af7c2f23 ("P2P2: Start P2P Client appropriately for P2P2 group") Signed-off-by: Shivani Baranwal --- diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index ef2331277..0ec4a2e29 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -1890,7 +1890,7 @@ static void wpas_start_gc(struct wpa_supplicant *wpa_s, os_memcpy(ssid->bssid, res->peer_interface_addr, ETH_ALEN); - if (res->akmp == WPA_KEY_MGMT_PASN && res->sae_password) { + if (res->akmp == WPA_KEY_MGMT_PASN && res->sae_password[0]) { ssid->auth_alg = WPA_AUTH_ALG_SAE; ssid->sae_password = os_strdup(res->sae_password); if (!ssid->sae_password)