Fix suboptimal use of ASSER_ALLOC()

Passing a length of 0 to it is perfectly acceptable, the macro was designed to
handle it correctly.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
Manuel Pégourié-Gonnard 2020-07-22 10:32:52 +02:00
parent ca8287cbaf
commit c3219006ff

View File

@ -4103,7 +4103,7 @@ void ssl_cf_hmac( int hash )
test_set_step( max_in_len * 10000 );
/* Use allocated in buffer to catch overreads */
ASSERT_ALLOC( data, max_in_len != 0 ? max_in_len : 1 );
ASSERT_ALLOC( data, max_in_len );
min_in_len = max_in_len > 255 ? max_in_len - 255 : 0;
for( in_len = min_in_len; in_len <= max_in_len; in_len++ )