Initialize status/ret to error value

Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
Przemek Stekiel 2022-07-29 11:27:46 +02:00
parent 2aae040615
commit f98b57f231

View file

@ -1211,7 +1211,7 @@ static int hash_mprime( const unsigned char *hash, size_t hlen,
#if defined(MBEDTLS_MD_C)
mbedtls_md_context_t md_ctx;
int ret;
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
const mbedtls_md_info_t *md_info = mbedtls_md_info_from_type( md_alg );
if( md_info == NULL )
@ -1238,7 +1238,7 @@ exit:
#else
psa_hash_operation_t op = PSA_HASH_OPERATION_INIT;
psa_algorithm_t alg = mbedtls_psa_translate_md( md_alg );
psa_status_t status = PSA_SUCCESS;
psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED ;
size_t out_size = PSA_HASH_LENGTH( alg );
size_t out_len;