diff --git a/tests/suites/test_suite_psa_crypto.function b/tests/suites/test_suite_psa_crypto.function index b6e6e5a97..bc95f6fb0 100644 --- a/tests/suites/test_suite_psa_crypto.function +++ b/tests/suites/test_suite_psa_crypto.function @@ -5297,6 +5297,8 @@ void generate_random( int bytes_arg ) size_t i; unsigned run; + TEST_ASSERT( bytes_arg >= 0 ); + ASSERT_ALLOC( output, bytes + sizeof( trail ) ); ASSERT_ALLOC( changed, bytes ); memcpy( output + bytes, trail, sizeof( trail ) );