From: Matt Caswell Date: Thu, 4 May 2017 13:47:59 +0000 (+0100) Subject: Fix an uninit read in igetest X-Git-Tag: OpenSSL_1_1_1-pre1~1590 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=de6ac50ddc6c901d43afcd914a1708f9b87efcf2;p=oweals%2Fopenssl.git Fix an uninit read in igetest Introduced by commit 0e534337b Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/2284) --- 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,