X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fpem%2Fpem_sign.c;h=7e7b32ebf7d0ca2548a9a6ce5c67ca48b5422766;hb=2459dc1bd09468c83f1767b6b6a1ddc45ba60d36;hp=12ad97450a3f88c3c908db546cf256e2c09520b7;hpb=823146d65fe145eb6024d84ab50ed63ba9f8705c;p=oweals%2Fopenssl.git diff --git a/crypto/pem/pem_sign.c b/crypto/pem/pem_sign.c index 12ad97450a..7e7b32ebf7 100644 --- a/crypto/pem/pem_sign.c +++ b/crypto/pem/pem_sign.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -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; @@ -46,5 +46,5 @@ int PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, err: /* ctx has been zeroed by EVP_SignFinal() */ OPENSSL_free(m); - return (ret); + return ret; }