wintrust: Check for the presence of required members of WINTRUST_BLOB_INFO rather than requiring callers to be compiled with the same SDK version.

This commit is contained in:
Juan Lang 2009-06-12 09:21:35 -07:00 committed by Alexandre Julliard
parent e65ebee63f
commit abacfc0f45
1 changed files with 2 additions and 1 deletions

View File

@ -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)