From b7836e1e8c71c7ffad9e6b740b89875a0493936c Mon Sep 17 00:00:00 2001 From: Simon Butcher Date: Sat, 2 Jun 2018 18:36:49 +0100 Subject: [PATCH] Change AES OFB tests to memset sizeof buffer --- tests/suites/test_suite_aes.function | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/suites/test_suite_aes.function b/tests/suites/test_suite_aes.function index 24e8f7ab6..f1e9033bb 100644 --- a/tests/suites/test_suite_aes.function +++ b/tests/suites/test_suite_aes.function @@ -305,11 +305,11 @@ void aes_encrypt_ofb( int fragment_size, char *hex_key_string, unsigned char* src_str_next; int key_len; - memset(key_str, 0x00, 32); - memset(iv_str, 0x00, 16); - memset(src_str, 0x00, 64); - memset(dst_str, 0x00, 64); - memset(output, 0x00, 32); + memset( key_str, 0x00, sizeof( key_str ) ); + memset( iv_str, 0x00, sizeof( iv_str ) ); + memset( src_str, 0x00, sizeof( src_str ) ); + memset( dst_str, 0x00, sizeof( dst_str ) ); + memset( output, 0x00, sizeof( output ) ); mbedtls_aes_init( &ctx ); TEST_ASSERT( strlen( hex_key_string ) <= ( 32 * 2 ) );