提交 e0f7cfda 编写于 作者: D Dr. Stephen Henson

Initialise CMS signature buffer length properly.

上级 c256e69d
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册