mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-23 02:55:41 +01:00
Initialise iv buffer before use
Commit initialises the iv buffer before it ias passed to mbedtls_cipher_set_iv(). Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
This commit is contained in:
parent
757464c865
commit
ac72f9c213
@ -1605,6 +1605,9 @@ void check_iv( int cipher_id, char * cipher_string,
|
|||||||
size_t iv_len = iv_len_val;
|
size_t iv_len = iv_len_val;
|
||||||
unsigned char iv[16];
|
unsigned char iv[16];
|
||||||
|
|
||||||
|
/* Initialise iv buffer */
|
||||||
|
memset( iv, 0, sizeof( iv ) );
|
||||||
|
|
||||||
const mbedtls_cipher_info_t *cipher_info;
|
const mbedtls_cipher_info_t *cipher_info;
|
||||||
mbedtls_cipher_context_t ctx_dec;
|
mbedtls_cipher_context_t ctx_dec;
|
||||||
mbedtls_cipher_context_t ctx_enc;
|
mbedtls_cipher_context_t ctx_enc;
|
||||||
|
Loading…
Reference in New Issue
Block a user