X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fpem%2Fpem_sign.c;h=4be03a479453ed9e951f2ef336e0971f07028754;hb=e9a5932d04f6b7dd25b39a8ff9dc162d64a78c22;hp=0d8b62a6e26fc111812009e5ac307360bdd1a1fc;hpb=6286757141a8c6e14d647ec733634ae0c83d9887;p=oweals%2Fopenssl.git diff --git a/crypto/pem/pem_sign.c b/crypto/pem/pem_sign.c index 0d8b62a6e2..4be03a4794 100644 --- a/crypto/pem/pem_sign.c +++ b/crypto/pem/pem_sign.c @@ -1,7 +1,7 @@ /* * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. * - * Licensed under the OpenSSL license (the "License"). You may not use + * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html @@ -9,7 +9,6 @@ #include #include "internal/cryptlib.h" -#include #include #include #include @@ -32,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; @@ -47,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; }