mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 22:45:48 +01:00
Add separate test for mbedtls_mpi_free() accepting NULL
This commit is contained in:
parent
d01ff493e5
commit
b48e1aa846
@ -1,4 +1,7 @@
|
||||
Parameter validation
|
||||
MPI - Valid parameters
|
||||
mpi_valid_param:
|
||||
|
||||
MPI - Invalid parameters
|
||||
mpi_invalid_param:
|
||||
|
||||
Arguments with no value
|
||||
|
@ -50,6 +50,13 @@ int mbedtls_test_mpi_miller_rabin_determinizer( void* state,
|
||||
* END_DEPENDENCIES
|
||||
*/
|
||||
|
||||
/* BEGIN_CASE */
|
||||
void mpi_valid_param( )
|
||||
{
|
||||
TEST_VALID_PARAM( mbedtls_mpi_free( NULL ) );
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_CHECK_PARAMS:!MBEDTLS_PARAM_FAILED_ALT */
|
||||
void mpi_invalid_param( )
|
||||
{
|
||||
@ -62,7 +69,6 @@ void mpi_invalid_param( )
|
||||
mbedtls_mpi_uint mpi_uint;
|
||||
|
||||
TEST_INVALID_PARAM( mbedtls_mpi_init( NULL ) );
|
||||
TEST_VALID_PARAM( mbedtls_mpi_free( NULL ) );
|
||||
|
||||
TEST_INVALID_PARAM_RET( MBEDTLS_ERR_MPI_BAD_INPUT_DATA,
|
||||
mbedtls_mpi_grow( NULL, 42 ) );
|
||||
|
Loading…
Reference in New Issue
Block a user