mirror of
https://github.com/yuzu-mirror/mbedtls.git
synced 2025-12-06 07:12:32 +01:00
Merge pull request #4729 from paul-elliott-arm/fix_test_illegal_access
Fix potential free of uninitialised pointer
This commit is contained in:
commit
918708b824
|
|
@ -179,11 +179,12 @@ void rsa_pkcs1_sign_raw( data_t * hash_result,
|
|||
mbedtls_test_rnd_pseudo_info rnd_info;
|
||||
|
||||
mbedtls_rsa_init( &ctx );
|
||||
TEST_ASSERT( mbedtls_rsa_set_padding( &ctx, padding_mode,
|
||||
MBEDTLS_MD_NONE ) == 0 );
|
||||
mbedtls_mpi_init( &N ); mbedtls_mpi_init( &P );
|
||||
mbedtls_mpi_init( &Q ); mbedtls_mpi_init( &E );
|
||||
|
||||
TEST_ASSERT( mbedtls_rsa_set_padding( &ctx, padding_mode,
|
||||
MBEDTLS_MD_NONE ) == 0 );
|
||||
|
||||
memset( output, 0x00, sizeof( output ) );
|
||||
memset( &rnd_info, 0, sizeof( mbedtls_test_rnd_pseudo_info ) );
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue