Fix severe bug zeroing outside memory.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2022-10-05 11:09:03 +02:00
parent 0758644583
commit 2d295d0d98

View File

@@ -303,7 +303,7 @@ int credential_derive_hmac_key(const uint8_t *cred_id, size_t cred_id_len, uint8
}
int credential_derive_chacha_key(uint8_t *outk) {
memset(outk, 0, 64);
memset(outk, 0, 32);
int r = 0;
if ((r = load_keydev(outk)) != 0)
return r;