wintrust(1/2): Check for the presence of required members of WINTRUST_BLOB_INFO rather than requiring callers to be compiled with the same SDK version

Juan Lang juan.lang at gmail.com
Fri Jun 12 11:41:55 CDT 2009


Inspired by my recent fix for bug 17951.
--Juan
-------------- next part --------------
From 1dd4006a628d858198aa92bb83eb15531555fe9e Mon Sep 17 00:00:00 2001
From: Juan Lang <juan.lang at gmail.com>
Date: Fri, 12 Jun 2009 09:21:35 -0700
Subject: [PATCH 1/2] Check for the presence of required members of WINTRUST_BLOB_INFO rather
 than requiring callers to be compiled with the same SDK version

---
 dlls/wintrust/wintrust_main.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/wintrust/wintrust_main.c b/dlls/wintrust/wintrust_main.c
index fa4da16..0a40fba 100644
--- a/dlls/wintrust/wintrust_main.c
+++ b/dlls/wintrust/wintrust_main.c
@@ -303,7 +303,8 @@ static HRESULT WINAPI WINTRUST_CertVerifyObjTrust(CRYPT_PROVIDER_DATA *data)
     {
     case WTD_CHOICE_BLOB:
         if (data->pWintrustData->u.pBlob &&
-         data->pWintrustData->u.pBlob->cbStruct == sizeof(WINTRUST_BLOB_INFO) &&
+         WVT_IS_CBSTRUCT_GT_MEMBEROFFSET(WINTRUST_BLOB_INFO,
+         data->pWintrustData->u.pBlob->cbStruct, pbMemObject) &&
          data->pWintrustData->u.pBlob->cbMemObject ==
          sizeof(CERT_VERIFY_CERTIFICATE_TRUST) &&
          data->pWintrustData->u.pBlob->pbMemObject)
-- 
1.6.3.2


More information about the wine-patches mailing list