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 <sergio_nsk@yahoo.de>
This commit is contained in:
Sergey 2023-03-06 15:37:23 -07:00 committed by GitHub
parent 40d79cef35
commit 04eb7c032e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;