diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2019-03-31 12:00:16 +0200 |
---|---|---|
committer | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2019-04-06 10:17:19 +0200 |
commit | 8cf85d489978c384a3f193fb7cb25469e0559f27 (patch) | |
tree | 647be2a02ff82d33d5028e5a596afed136c353dd /crypto/pem/pem_sign.c | |
parent | EVP configuration section: add 'default_properties' command (diff) | |
download | openssl-8cf85d489978c384a3f193fb7cb25469e0559f27.tar.xz openssl-8cf85d489978c384a3f193fb7cb25469e0559f27.zip |
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/pem/pem_sign.c')
-rw-r--r-- | crypto/pem/pem_sign.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/pem/pem_sign.c b/crypto/pem/pem_sign.c index d8f6d07ae7..4be03a4794 100644 --- a/crypto/pem/pem_sign.c +++ b/crypto/pem/pem_sign.c @@ -31,7 +31,7 @@ int PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, int i, ret = 0; unsigned int m_len; - m = OPENSSL_malloc(EVP_PKEY_size(pkey) + 2); + m = OPENSSL_malloc(EVP_PKEY_size(pkey)); if (m == NULL) { PEMerr(PEM_F_PEM_SIGNFINAL, ERR_R_MALLOC_FAILURE); goto err; |