From: Dr. Stephen Henson Date: Tue, 26 Feb 2002 19:32:16 +0000 (+0000) Subject: Always init ctx_tmp in PKCS7_dataFinal since it is always cleaned up. X-Git-Tag: OpenSSL_0_9_7-beta1~194 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=bb9dcc99cf6d31833ba98be41fd402da65fde3d9;p=oweals%2Fopenssl.git Always init ctx_tmp in PKCS7_dataFinal since it is always cleaned up. --- diff --git a/crypto/pkcs7/pk7_doit.c b/crypto/pkcs7/pk7_doit.c index f016fdb2e2..4a4ff340ce 100644 --- a/crypto/pkcs7/pk7_doit.c +++ b/crypto/pkcs7/pk7_doit.c @@ -512,6 +512,7 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio) STACK_OF(PKCS7_SIGNER_INFO) *si_sk=NULL; ASN1_OCTET_STRING *os=NULL; + EVP_MD_CTX_init(&ctx_tmp); i=OBJ_obj2nid(p7->type); p7->state=PKCS7_S_HEADER; @@ -576,7 +577,6 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio) /* We now have the EVP_MD_CTX, lets do the * signing. */ - EVP_MD_CTX_init(&ctx_tmp); EVP_MD_CTX_copy_ex(&ctx_tmp,mdc); if (!BUF_MEM_grow(buf,EVP_PKEY_size(si->pkey))) {