Merge pull request #5683 from paul-elliott-arm/fix_pk_test

Prevent free of uninitialised MPI  variables
This commit is contained in:
Gilles Peskine 2022-04-04 17:51:49 +02:00 committed by GitHub
commit 1c7c5969ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -732,6 +732,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 ) );