From 04eb7c032e066612badbbbfa1d4f4af821cf1522 Mon Sep 17 00:00:00 2001 From: Sergey Date: Mon, 6 Mar 2023 15:37:23 -0700 Subject: [PATCH] Fix llvm error: variable 'default_iv_length' may be used uninitialized Backport of https://github.com/Mbed-TLS/mbedtls/pull/7210 Signed-off-by: Sergey --- library/psa_crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/psa_crypto.c b/library/psa_crypto.c index d8a9940453db..c58fdae2cf3b 100644 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c @@ -3392,7 +3392,7 @@ psa_status_t psa_cipher_generate_iv(psa_cipher_operation_t *operation, { psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; uint8_t local_iv[PSA_CIPHER_IV_MAX_SIZE]; - size_t default_iv_length; + size_t default_iv_length = 0; if (operation->id == 0) { status = PSA_ERROR_BAD_STATE;