mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 22:35:43 +01:00
Don't call memset on NULL pointer in NIST KW test suite
Note: There's no need to call `memset()` after `calloc()` because `calloc()` includes zeroization.
This commit is contained in:
parent
ce8bdf82a1
commit
af5d8abf26
@ -170,10 +170,6 @@ void nist_kw_plaintext_lengths( int in_len, int out_len, int mode, int res )
|
||||
TEST_ASSERT( ciphertext != NULL );
|
||||
}
|
||||
|
||||
memset( plaintext, 0, in_len );
|
||||
memset( ciphertext, 0, output_len );
|
||||
|
||||
|
||||
TEST_ASSERT( mbedtls_nist_kw_setkey( &ctx, MBEDTLS_CIPHER_ID_AES,
|
||||
key, 8 * sizeof( key ), 1 ) == 0 );
|
||||
|
||||
@ -225,10 +221,6 @@ void nist_kw_ciphertext_lengths( int in_len, int out_len, int mode, int res )
|
||||
TEST_ASSERT( ciphertext != NULL );
|
||||
}
|
||||
|
||||
memset( plaintext, 0, output_len );
|
||||
memset( ciphertext, 0, in_len );
|
||||
|
||||
|
||||
TEST_ASSERT( mbedtls_nist_kw_setkey( &ctx, MBEDTLS_CIPHER_ID_AES,
|
||||
key, 8 * sizeof( key ), 0 ) == 0 );
|
||||
unwrap_ret = mbedtls_nist_kw_unwrap( &ctx, mode, ciphertext, in_len,
|
||||
|
Loading…
Reference in New Issue
Block a user