Commit efd063f5 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

wintrust/tests: Initialize the pSigState member to prevent Windows 8 and 10 from crashing.

parent 098aa2be
......@@ -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)
......
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