summaryrefslogtreecommitdiffstats
path: root/crypto/evp/p_open.c
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2019-03-31 12:00:16 +0200
committerBernd Edlinger <bernd.edlinger@hotmail.de>2019-04-06 10:17:19 +0200
commit8cf85d489978c384a3f193fb7cb25469e0559f27 (patch)
tree647be2a02ff82d33d5028e5a596afed136c353dd /crypto/evp/p_open.c
parentde3955f66225e42bfae710c50b51c98aa4616ac1 (diff)
Fix the allocation size in EVP_OpenInit and PEM_SignFinal
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8620)
Diffstat (limited to 'crypto/evp/p_open.c')
-rw-r--r--crypto/evp/p_open.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/evp/p_open.c b/crypto/evp/p_open.c
index c9cd9b16c8..a141eb4da5 100644
--- a/crypto/evp/p_open.c
+++ b/crypto/evp/p_open.c
@@ -40,7 +40,7 @@ int EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
}
size = EVP_PKEY_size(priv);
- key = OPENSSL_malloc(size + 2);
+ key = OPENSSL_malloc(size);
if (key == NULL) {
/* ERROR */
EVPerr(EVP_F_EVP_OPENINIT, ERR_R_MALLOC_FAILURE);