From c3219006ff5b6c2f2c05c01319147f91e67590cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 22 Jul 2020 10:32:52 +0200 Subject: [PATCH] Fix suboptimal use of ASSER_ALLOC() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tests/suites/test_suite_ssl.function | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/suites/test_suite_ssl.function b/tests/suites/test_suite_ssl.function index 602dc36d5..5f301b5b6 100644 --- a/tests/suites/test_suite_ssl.function +++ b/tests/suites/test_suite_ssl.function @@ -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++ )