Fix coverity reported issues

This commit is contained in:
Kapil Gupta 2022-06-02 19:08:22 +05:30
parent 944690a5e7
commit 916a4d6524
2 changed files with 5 additions and 2 deletions

View File

@ -1060,6 +1060,7 @@ void __wpa_send_eapol(struct wpa_authenticator *wpa_auth,
os_free(hdr);
return;
}
os_free(buf);
}
if (key_info & WPA_KEY_INFO_MIC) {

View File

@ -815,8 +815,10 @@ static int sae_derive_keys(struct sae_data *sae, const u8 *k)
*/
os_memset(null_key, 0, sizeof(null_key));
hmac_sha256(null_key, sizeof(null_key), k, sae->tmp->prime_len,
keyseed);
if (hmac_sha256(null_key, sizeof(null_key), k, sae->tmp->prime_len,
keyseed) < 0)
goto fail;
wpa_hexdump_key(MSG_DEBUG, "SAE: keyseed", keyseed, sizeof(keyseed));
crypto_bignum_add(sae->tmp->own_commit_scalar, sae->peer_commit_scalar,