mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-02-18 09:10:38 +01:00
owe: check for error return getting shared_secret
This commit is contained in:
parent
7b1e1497b7
commit
ab92901252
@ -165,9 +165,11 @@ static bool owe_compute_keys(struct owe_sm *owe, const void *public_key,
|
|||||||
l_ecc_point_free(other_public);
|
l_ecc_point_free(other_public);
|
||||||
|
|
||||||
nbytes = l_ecc_scalar_get_data(shared_secret, ss_buf, sizeof(ss_buf));
|
nbytes = l_ecc_scalar_get_data(shared_secret, ss_buf, sizeof(ss_buf));
|
||||||
|
|
||||||
l_ecc_scalar_free(shared_secret);
|
l_ecc_scalar_free(shared_secret);
|
||||||
|
|
||||||
|
if (nbytes < 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
ptr += l_ecc_point_get_x(owe->public_key, ptr, sizeof(key));
|
ptr += l_ecc_point_get_x(owe->public_key, ptr, sizeof(key));
|
||||||
memcpy(ptr, public_key, nbytes);
|
memcpy(ptr, public_key, nbytes);
|
||||||
ptr += nbytes;
|
ptr += nbytes;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user