From 004f917ee80711ba0539181313e48168816f7d41 Mon Sep 17 00:00:00 2001 From: Ronald Cron Date: Tue, 16 Mar 2021 17:26:12 +0100 Subject: [PATCH] psa: aead: Fix status initialization Signed-off-by: Ronald Cron --- library/psa_crypto.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/psa_crypto.c b/library/psa_crypto.c index 9c8e108df..5de0f10a4 100644 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c @@ -3568,7 +3568,7 @@ static psa_status_t psa_aead_setup( aead_operation_t *operation, psa_key_usage_t usage, psa_algorithm_t alg ) { - psa_status_t status; + psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; size_t key_bits; mbedtls_cipher_id_t cipher_id; @@ -3684,7 +3684,7 @@ psa_status_t psa_aead_encrypt( mbedtls_svc_key_id_t key, size_t ciphertext_size, size_t *ciphertext_length ) { - psa_status_t status; + psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; aead_operation_t operation = AEAD_OPERATION_INIT; uint8_t *tag; @@ -3799,7 +3799,7 @@ psa_status_t psa_aead_decrypt( mbedtls_svc_key_id_t key, size_t plaintext_size, size_t *plaintext_length ) { - psa_status_t status; + psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; aead_operation_t operation = AEAD_OPERATION_INIT; const uint8_t *tag = NULL;