Merge pull request #6325 from gabor-mezei-arm/6308_missing_initialization_in_test

Add initialization for structures in test
This commit is contained in:
Gilles Peskine 2022-10-05 11:09:35 +02:00 committed by GitHub
commit 80ca44f33c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 0 deletions

View File

@ -50,6 +50,9 @@ void ecdh_invalid_param( )
mbedtls_ecp_keypair kp;
int invalid_side = 42;
mbedtls_ecdh_init( &ctx );
mbedtls_ecp_keypair_init( &kp );
TEST_EQUAL( MBEDTLS_ERR_ECP_BAD_INPUT_DATA,
mbedtls_ecdh_get_params( &ctx, &kp,
invalid_side ) );

View File

@ -109,6 +109,8 @@ void ecjpake_invalid_param( )
mbedtls_md_type_t valid_md = MBEDTLS_MD_SHA256;
mbedtls_ecp_group_id valid_group = MBEDTLS_ECP_DP_SECP256R1;
mbedtls_ecjpake_init( &ctx );
TEST_EQUAL( MBEDTLS_ERR_ECP_BAD_INPUT_DATA,
mbedtls_ecjpake_setup( &ctx,
invalid_role,

View File

@ -72,6 +72,9 @@ void ecp_invalid_param( )
size_t olen;
unsigned char buf[42] = { 0 };
mbedtls_ecp_group_init( &grp );
mbedtls_ecp_point_init( &P );
TEST_EQUAL( MBEDTLS_ERR_ECP_BAD_INPUT_DATA,
mbedtls_ecp_point_write_binary( &grp, &P,
invalid_fmt,