Merge pull request #377 from sbutcher-arm/gcc7-warning-fix

Fix warning with gcc7 - maximum allocation exceeded
This commit is contained in:
Jaeden Amero 2020-03-17 22:44:23 +04:00 committed by GitHub
commit 4fca6b1a15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 ) );