mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-02-24 07:06:44 +00:00
Initialize ret from test code
The test function mbedtls_mpi_lt_mpi_ct did not initialize ret in test code. If there was a bug in library code whereby the library function mbedtls_mpi_lt_mpi_ct() did not set ret when it should, we might have missed it if ret happened to contain the expected value. So initialize ret to a value that we never expect. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
349eadc58f
commit
0deccf1f3e
|
@ -596,7 +596,7 @@ void mbedtls_mpi_lt_mpi_ct( int size_X, char * input_X,
|
||||||
int size_Y, char * input_Y,
|
int size_Y, char * input_Y,
|
||||||
int input_ret, int input_err )
|
int input_ret, int input_err )
|
||||||
{
|
{
|
||||||
unsigned ret;
|
unsigned ret = -1;
|
||||||
unsigned input_uret = input_ret;
|
unsigned input_uret = input_ret;
|
||||||
mbedtls_mpi X, Y;
|
mbedtls_mpi X, Y;
|
||||||
mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y );
|
mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y );
|
||||||
|
|
Loading…
Reference in a new issue