wpa_supplicant: fix gcc-12 compile errors

This commit is contained in:
Alexey Lapshin 2023-02-06 11:37:59 +07:00
parent a7e51b2509
commit adcdfa641c
2 changed files with 3 additions and 3 deletions

View File

@ -109,7 +109,7 @@ static int wpa_bss_known(struct wpa_supplicant *wpa_s, struct wpa_bss *bss)
{
struct wifi_ssid *ssid = esp_wifi_sta_get_prof_ssid_internal();
if (ssid->ssid == NULL || ssid->len == 0)
if (ssid->len == 0)
return 0;
if (ssid->len == bss->ssid_len &&
os_memcmp(ssid->ssid, bss->ssid, ssid->len) == 0)

View File

@ -322,8 +322,6 @@ int pkcs1_v15_sig_ver(struct crypto_public_key *pk,
return -1;
}
os_free(decrypted);
if (hdr.payload + hdr.length != decrypted + decrypted_len) {
wpa_printf(MSG_INFO,
"PKCS #1: Extra data after signature - reject");
@ -332,8 +330,10 @@ int pkcs1_v15_sig_ver(struct crypto_public_key *pk,
hdr.payload + hdr.length,
decrypted + decrypted_len - hdr.payload -
hdr.length);
os_free(decrypted);
return -1;
}
os_free(decrypted);
return 0;
}