Fix uninitialized memory bug in MPS reader test

Signed-off-by: Hanno Becker <hanno.becker@arm.com>
This commit is contained in:
Hanno Becker 2021-03-19 05:23:30 +00:00
parent 3c6386cde5
commit 5b3841d592

View file

@ -304,6 +304,9 @@ void mbedtls_mps_reader_reclaim_overflow()
unsigned char *tmp;
mbedtls_mps_reader rd;
for( size_t i=0; (unsigned) i < sizeof( buf ); i++ )
buf[i] = (unsigned char) i;
/* Preparation (lower layer) */
mbedtls_mps_reader_init( &rd, acc, sizeof( acc ) );
TEST_ASSERT( mbedtls_mps_reader_feed( &rd, buf, sizeof( buf ) ) == 0 );