[PATCH] schannel/tests: Avoid dereferencing a null function pointer
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> --- Fixes a test crash on my Windows 10 machine. We have seen the same crash at least once on the test VMs too. dlls/schannel/tests/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/schannel/tests/main.c b/dlls/schannel/tests/main.c index 4240dd76cb..fb350d5e62 100644 --- a/dlls/schannel/tests/main.c +++ b/dlls/schannel/tests/main.c @@ -213,6 +213,11 @@ static void testGetInfo(void) pTables = getNextSecPkgTable(pTables, Version); if (!pTables) return; + if (!pTables->GetInfo) + { + win_skip("GetInfo function missing\n"); + return; + } status = pTables->GetInfo(&PackageInfo); ok(status == STATUS_SUCCESS || status == SEC_E_UNSUPPORTED_FUNCTION, /* win2k3 */ -- 2.15.1
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> --- In addition to making the tests valid, this fixes an intermittent crash on Windows 10 when funcs.psUIpfns happens to be initialized with garbage. dlls/wintrust/tests/register.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/wintrust/tests/register.c b/dlls/wintrust/tests/register.c index 42c5de68b3..32c8782749 100644 --- a/dlls/wintrust/tests/register.c +++ b/dlls/wintrust/tests/register.c @@ -224,7 +224,7 @@ static void test_AddDefaultForUsage(void) static void test_LoadFunctionPointers(void) { BOOL ret; - CRYPT_PROVIDER_FUNCTIONS funcs; + CRYPT_PROVIDER_FUNCTIONS funcs = {0}; GUID action = WINTRUST_ACTION_GENERIC_VERIFY_V2; if (!pWintrustLoadFunctionPointers) -- 2.15.1
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> --- include/wintrust.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/wintrust.h b/include/wintrust.h index 20fb29683c..dcb432a6dc 100644 --- a/include/wintrust.h +++ b/include/wintrust.h @@ -420,7 +420,7 @@ typedef BOOL (*PFN_PROVUI_CALL)(HWND hWndSecurityDialog, typedef struct _CRYPT_PROVUI_FUNCS { DWORD cbStruct; - CRYPT_PROVUI_DATA psUIData; + CRYPT_PROVUI_DATA *psUIData; PFN_PROVUI_CALL pfnOnMoreInfoClick; PFN_PROVUI_CALL pfnOnMoreInfoClickDefault; PFN_PROVUI_CALL pfnOnAdvancedClick; -- 2.15.1
Hi, While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at https://testbot.winehq.org/JobDetails.pl?Key=35342 Your paranoid android. === w8 (32 bit main) === main.c:222: Test failed: status: 0x74be157d === w864 (32 bit main) === main.c:222: Test failed: status: 0x745b157d === w1064 (32 bit main) === main.c:222: Test failed: status: 0x701cadf0 === w864 (64 bit main) === main.c:222: Test failed: status: 0x22091010 === w1064 (64 bit main) === main.c:222: Test failed: status: 0x39a4e600
participants (2)
-
Alex Henrie -
Marvin