diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2013-07-02 22:11:27 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2013-10-01 14:01:17 +0100 |
commit | 869772ff08fceb1082750572ce131af78f30d96e (patch) | |
tree | 4a68c7626152129e7332b87e9546e1f29cb0fcc9 /crypto/cms | |
parent | f2edf3181e30413c99864e7106125be7da905678 (diff) |
Initialise CMS signature buffer length properly.
(cherry picked from commit e0f7cfda68881da6829ea39430e1a5c28ed05ece)
Diffstat (limited to 'crypto/cms')
-rw-r--r-- | crypto/cms/cms_sd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/cms/cms_sd.c b/crypto/cms/cms_sd.c index b7eb9626e7..25af94136a 100644 --- a/crypto/cms/cms_sd.c +++ b/crypto/cms/cms_sd.c @@ -700,7 +700,8 @@ static int cms_SignerInfo_content_sign(CMS_ContentInfo *cms, pctx = si->pctx; if (!EVP_DigestFinal_ex(&mctx, md, &mdlen)) goto err; - sig = OPENSSL_malloc(EVP_PKEY_size(si->pkey)); + siglen = EVP_PKEY_size(si->pkey); + sig = OPENSSL_malloc(siglen); if (!sig) { CMSerr(CMS_F_CMS_SIGNERINFO_CONTENT_SIGN, |