Fix possible uninitialization error
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
This commit is contained in:
parent
78c4fb4551
commit
f65c71fbe6
1 changed files with 3 additions and 3 deletions
|
@ -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 a new issue