mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-08 17:42:09 +03:00
Merge pull request #3474 from ronald-cron-arm/common-mbedtls_param_failed
Common mbedtls_param_failed()
This commit is contained in:
@@ -165,17 +165,23 @@ $dispatch_code
|
||||
void execute_function_ptr(TestWrapper_t fp, void **params)
|
||||
{
|
||||
#if defined(MBEDTLS_CHECK_PARAMS)
|
||||
if ( setjmp( param_fail_jmp ) == 0 )
|
||||
mbedtls_test_param_failed_location_record_t location_record;
|
||||
|
||||
if ( setjmp( mbedtls_test_param_failed_get_state_buf( ) ) == 0 )
|
||||
{
|
||||
fp( params );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Unexpected parameter validation error */
|
||||
mbedtls_test_param_failed_get_location_record( &location_record );
|
||||
test_fail( location_record.failure_condition,
|
||||
location_record.line,
|
||||
location_record.file );
|
||||
test_info.result = TEST_RESULT_FAILED;
|
||||
}
|
||||
|
||||
memset( param_fail_jmp, 0, sizeof(jmp_buf) );
|
||||
mbedtls_test_param_failed_reset_state( );
|
||||
#else
|
||||
fp( params );
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user