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 <quic_shivbara@quicinc.com>
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)