Commit 0b0df876 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32: More parameter checking for opening signed encoded messages.

parent 19e63d90
...@@ -567,6 +567,17 @@ typedef struct _CMSG_SIGNED_ENCODE_INFO_WITH_CMS ...@@ -567,6 +567,17 @@ typedef struct _CMSG_SIGNED_ENCODE_INFO_WITH_CMS
static BOOL CRYPT_IsValidSigner(CMSG_SIGNER_ENCODE_INFO_WITH_CMS *signer) static BOOL CRYPT_IsValidSigner(CMSG_SIGNER_ENCODE_INFO_WITH_CMS *signer)
{ {
if (signer->cbSize != sizeof(CMSG_SIGNER_ENCODE_INFO) &&
signer->cbSize != sizeof(CMSG_SIGNER_ENCODE_INFO_WITH_CMS))
{
SetLastError(E_INVALIDARG);
return FALSE;
}
if (signer->cbSize == sizeof(CMSG_SIGNER_ENCODE_INFO_WITH_CMS))
{
FIXME("CMSG_SIGNER_ENCODE_INFO with CMS fields unsupported\n");
return FALSE;
}
if (!signer->pCertInfo->SerialNumber.cbData) if (!signer->pCertInfo->SerialNumber.cbData)
{ {
SetLastError(E_INVALIDARG); SetLastError(E_INVALIDARG);
......
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