Merge pull request #8883 from mfischer/fix_shared_secret

library: psa_crypto: Explicitly initialize shared_secret
This commit is contained in:
Janos Follath 2024-03-08 14:35:20 +00:00 committed by GitHub
commit a812e0fe14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6940,7 +6940,7 @@ static psa_status_t psa_key_agreement_internal(psa_key_derivation_operation_t *o
size_t peer_key_length)
{
psa_status_t status;
uint8_t shared_secret[PSA_RAW_KEY_AGREEMENT_OUTPUT_MAX_SIZE];
uint8_t shared_secret[PSA_RAW_KEY_AGREEMENT_OUTPUT_MAX_SIZE] = { 0 };
size_t shared_secret_length = 0;
psa_algorithm_t ka_alg = PSA_ALG_KEY_AGREEMENT_GET_BASE(operation->alg);