3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-26 18:12:42 +01:00

owe: check for error return getting shared_secret

This commit is contained in:
James Prestwood 2019-10-16 15:29:50 -07:00 committed by Denis Kenzior
parent 7b1e1497b7
commit ab92901252

View File

@ -165,9 +165,11 @@ static bool owe_compute_keys(struct owe_sm *owe, const void *public_key,
l_ecc_point_free(other_public);
nbytes = l_ecc_scalar_get_data(shared_secret, ss_buf, sizeof(ss_buf));
l_ecc_scalar_free(shared_secret);
if (nbytes < 0)
return false;
ptr += l_ecc_point_get_x(owe->public_key, ptr, sizeof(key));
memcpy(ptr, public_key, nbytes);
ptr += nbytes;