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

Alexandre Julliard julliard at winehq.org
Mon Nov 28 15:52:47 CST 2016


Module: wine
Branch: master
Commit: efd063f5c569fe704a29f247ad53e4226872e704
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=efd063f5c569fe704a29f247ad53e4226872e704

Author: Huw Davies <huw at codeweavers.com>
Date:   Mon Nov 28 13:10:11 2016 +0000

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

Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wintrust/tests/softpub.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dlls/wintrust/tests/softpub.c b/dlls/wintrust/tests/softpub.c
index 3bb615e..9ac15e1 100644
--- a/dlls/wintrust/tests/softpub.c
+++ b/dlls/wintrust/tests/softpub.c
@@ -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)




More information about the wine-cvs mailing list