wintrust/tests: Initialize the pSigState member to prevent Windows 8 and 10 from crashing.
Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
098aa2be84
commit
efd063f5c5
|
@ -300,6 +300,7 @@ static void testObjTrust(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID)
|
|||
{
|
||||
HRESULT ret;
|
||||
CRYPT_PROVIDER_DATA data = { 0 };
|
||||
CRYPT_PROVIDER_SIGSTATE sig_state = { 0 };
|
||||
WINTRUST_DATA wintrust_data = { 0 };
|
||||
WINTRUST_CERT_INFO certInfo = { sizeof(WINTRUST_CERT_INFO), 0 };
|
||||
WINTRUST_FILE_INFO fileInfo = { sizeof(WINTRUST_FILE_INFO), 0 };
|
||||
|
@ -313,6 +314,7 @@ static void testObjTrust(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID)
|
|||
/* Crashes
|
||||
ret = funcs->pfnObjectTrust(NULL);
|
||||
*/
|
||||
data.pSigState = &sig_state;
|
||||
data.pWintrustData = &wintrust_data;
|
||||
data.padwTrustStepErrors =
|
||||
funcs->pfnAlloc(TRUSTERROR_MAX_STEPS * sizeof(DWORD));
|
||||
|
@ -541,6 +543,7 @@ static const BYTE selfSignedCert[] = {
|
|||
static void testCertTrust(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID)
|
||||
{
|
||||
CRYPT_PROVIDER_DATA data = { 0 };
|
||||
CRYPT_PROVIDER_SIGSTATE sig_state = { 0 };
|
||||
CRYPT_PROVIDER_SGNR sgnr = { sizeof(sgnr), { 0 } };
|
||||
HRESULT ret;
|
||||
BOOL b;
|
||||
|
@ -551,6 +554,7 @@ static void testCertTrust(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID)
|
|||
return;
|
||||
}
|
||||
|
||||
data.pSigState = &sig_state;
|
||||
data.padwTrustStepErrors =
|
||||
funcs->pfnAlloc(TRUSTERROR_MAX_STEPS * sizeof(DWORD));
|
||||
if (!data.padwTrustStepErrors)
|
||||
|
|
Loading…
Reference in New Issue