diff options
author | Rich Salz <rsalz@openssl.org> | 2018-06-28 18:13:54 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2018-06-28 19:46:38 -0400 |
commit | e21602857e79becb64eb8cba3673830bd7a304e3 (patch) | |
tree | 2c32a6c1694a2da1fc1aa79d8d13a641dd1d2a4e | |
parent | 2f1ad5c81bd1856061cfe1c2d36b0af85f05ddf7 (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.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c index 33c03eec00..735cd54e57 100644 --- a/crypto/pem/pem_lib.c +++ b/crypto/pem/pem_lib.c @@ -466,6 +466,7 @@ int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher) char *dekinfostart, c; cipher->cipher = NULL; + memset(cipher->iv, 0, sizeof(cipher->iv)); if ((header == NULL) || (*header == '\0') || (*header == '\n')) return 1; |