Juan Lang : crypt32:
More parameter checking for opening signed encoded messages.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Jul 24 07:06:10 CDT 2007
Module: wine
Branch: master
Commit: 0b0df876b2f306d298ca6bc93877cbb3dcd69072
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0b0df876b2f306d298ca6bc93877cbb3dcd69072
Author: Juan Lang <juan.lang at gmail.com>
Date: Mon Jul 23 17:35:17 2007 -0700
crypt32: More parameter checking for opening signed encoded messages.
---
dlls/crypt32/msg.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c
index c134e68..ce2ac3d 100644
--- a/dlls/crypt32/msg.c
+++ b/dlls/crypt32/msg.c
@@ -567,6 +567,17 @@ typedef struct _CMSG_SIGNED_ENCODE_INFO_WITH_CMS
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)
{
SetLastError(E_INVALIDARG);
More information about the wine-cvs
mailing list