From de6ac50ddc6c901d43afcd914a1708f9b87efcf2 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Thu, 4 May 2017 14:47:59 +0100 Subject: [PATCH] Fix an uninit read in igetest Introduced by commit 0e534337b Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/2284) --- test/igetest.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/igetest.c b/test/igetest.c index fc80275495..f6972b6b0a 100644 --- a/test/igetest.c +++ b/test/igetest.c @@ -362,6 +362,7 @@ static int test_bi_ige_garble1(void) unsigned int n; size_t matches; + memcpy(iv, saved_iv, sizeof iv); AES_set_encrypt_key(rkey, 8 * sizeof rkey, &key); AES_set_encrypt_key(rkey2, 8 * sizeof rkey2, &key2); AES_ige_encrypt(plaintext, ciphertext, sizeof plaintext, &key, iv, @@ -392,6 +393,7 @@ static int test_bi_ige_garble2(void) unsigned int n; size_t matches; + memcpy(iv, saved_iv, sizeof iv); AES_set_encrypt_key(rkey, 8 * sizeof rkey, &key); AES_set_encrypt_key(rkey2, 8 * sizeof rkey2, &key2); AES_ige_encrypt(plaintext, ciphertext, sizeof plaintext, &key, iv, @@ -422,6 +424,7 @@ static int test_bi_ige_garble3(void) unsigned int n; size_t matches; + memcpy(iv, saved_iv, sizeof iv); AES_set_encrypt_key(rkey, 8 * sizeof rkey, &key); AES_set_encrypt_key(rkey2, 8 * sizeof rkey2, &key2); AES_ige_encrypt(plaintext, ciphertext, sizeof plaintext, &key, iv, -- 2.25.1