Do not read uninitialized memory

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
This commit is contained in:
Gabor Mezei 2022-09-16 17:14:22 +02:00
parent f4dd3b6a6d
commit b2763ef507
No known key found for this signature in database
GPG key ID: F072ACA227ACD71D

View file

@ -810,7 +810,8 @@ void mpi_core_cond_assign( data_t * input_X,
Y, len_Y * sizeof( mbedtls_mpi_uint ) );
else
TEST_ASSERT( memcmp( X, Y, len_X * sizeof( mbedtls_mpi_uint ) ) != 0 );
TEST_ASSERT( memcmp( X, Y, MIN( len_X, len_Y ) *
sizeof( mbedtls_mpi_uint ) ) != 0 );
exit:
;