mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-03 23:43:40 +00:00
Fix possible uninitialization error
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
This commit is contained in:
parent
78c4fb4551
commit
f65c71fbe6
@ -207,6 +207,9 @@ void mpi_mod_mul_neg( char * input_A,
|
||||
mbedtls_mpi_mod_modulus m;
|
||||
mbedtls_mpi_mod_modulus_init( &m );
|
||||
|
||||
mbedtls_mpi_mod_modulus fake_m;
|
||||
mbedtls_mpi_mod_modulus_init( &fake_m );
|
||||
|
||||
TEST_EQUAL( test_read_modulus( &m, MBEDTLS_MPI_MOD_REP_MONTGOMERY, input_N ),
|
||||
0 );
|
||||
|
||||
@ -223,9 +226,6 @@ void mpi_mod_mul_neg( char * input_A,
|
||||
|
||||
TEST_EQUAL( mbedtls_mpi_mod_mul( &rX, &rA, &rB, &m ), exp_ret );
|
||||
|
||||
mbedtls_mpi_mod_modulus fake_m;
|
||||
mbedtls_mpi_mod_modulus_init( &fake_m );
|
||||
|
||||
/* Check when m is not initialized */
|
||||
TEST_EQUAL( mbedtls_mpi_mod_mul( &rX, &rA, &rB, &fake_m ),
|
||||
MBEDTLS_ERR_MPI_BAD_INPUT_DATA );
|
||||
|
Loading…
Reference in New Issue
Block a user