summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2018-06-28 18:13:54 -0400
committerRich Salz <rsalz@openssl.org>2018-06-28 19:47:12 -0400
commit2c739f72e5236a8e0c351c00047c77083dcdb77f (patch)
tree2a4c654b53a36989baade1e612f51a4597030529
parentda0bbdd62614df6d6a33f91142a3e72525f7186e (diff)
Zero-fill IV by default.
Fixes uninitialized memory read reported by Nick Mathewson Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6603) (cherry picked from commit 10c3c1c1ec41ce16e51b92bb18fab92d1a42b49c)
-rw-r--r--crypto/pem/pem_lib.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c
index eb59050659..4ccc676ed7 100644
--- a/crypto/pem/pem_lib.c
+++ b/crypto/pem/pem_lib.c
@@ -487,6 +487,7 @@ int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher)
char **header_pp = &header;
cipher->cipher = NULL;
+ memset(cipher->iv, 0, sizeof(cipher->iv));
if ((header == NULL) || (*header == '\0') || (*header == '\n'))
return (1);
if (strncmp(header, "Proc-Type: ", 11) != 0) {