Commit 6763841e authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32: Make sure a signed encode message's signer info is always initialized.

parent 9ae5ef66
......@@ -1248,7 +1248,9 @@ static HCRYPTMSG CSignedEncodeMsg_Open(DWORD dwFlags,
}
else
ret = FALSE;
if (ret && info->cSigners)
if (ret)
{
if (info->cSigners)
{
msg->msg_data.info->rgSignerInfo =
CryptMemAlloc(info->cSigners * sizeof(CMSG_SIGNER_INFO));
......@@ -1276,6 +1278,12 @@ static HCRYPTMSG CSignedEncodeMsg_Open(DWORD dwFlags,
else
ret = FALSE;
}
else
{
msg->msg_data.info->cSignerInfo = 0;
msg->msg_data.signerHandles = NULL;
}
}
if (ret)
ret = CRYPT_ConstructBlobArray(
(BlobArray *)&msg->msg_data.info->cCertEncoded,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment