mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-08-23 11:39:54 +00:00
Prevent free of uninitialised variables
In an error case it was possible for mbedtls_mpi variables to be free'd uninitialised. Signed-off-by: Paul Elliott <[email protected]>
This commit is contained in:
@@ -723,6 +723,8 @@ void pk_rsa_encrypt_decrypt_test( data_t * message, int mod, int radix_P,
|
||||
size_t olen, rlen;
|
||||
|
||||
mbedtls_pk_init( &pk );
|
||||
mbedtls_mpi_init( &N ); mbedtls_mpi_init( &P );
|
||||
mbedtls_mpi_init( &Q ); mbedtls_mpi_init( &E );
|
||||
|
||||
memset( &rnd_info, 0, sizeof( mbedtls_test_rnd_pseudo_info ) );
|
||||
memset( output, 0, sizeof( output ) );
|
||||
|
||||
Reference in New Issue
Block a user