[PATCH 0/1] MR11068: crypt32/tests: Avoid crash in testCertProperties.
Followup of 213ee7e9a1. The [test pattern page](https://test.winehq.org/data/patterns.html#crypt32:cert) shows Windows tests are crashing since above patch. It looks like Windows is dereferencing the given "handle". This patch assigns a valid pointer to some memory and makes the test succeed. [Testbot run with this patch](https://testbot.winehq.org/JobDetails.pl?Key=163232) CC: @trent.waddington -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11068
From: Bernhard Übelacker <bernhardu@mailbox.org> Followup of 213ee7e9a1. --- dlls/crypt32/tests/cert.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/crypt32/tests/cert.c b/dlls/crypt32/tests/cert.c index 4771be721b7..9189343b108 100644 --- a/dlls/crypt32/tests/cert.c +++ b/dlls/crypt32/tests/cert.c @@ -545,7 +545,8 @@ static void testCertProperties(void) /* Set an NCrypt key handle via property 78 */ { - HCRYPTPROV_OR_NCRYPT_KEY_HANDLE ncryptHandle = 0xBEEF1234; + char buf[100] = {0}; + HCRYPTPROV_OR_NCRYPT_KEY_HANDLE ncryptHandle = (HCRYPTPROV_OR_NCRYPT_KEY_HANDLE)buf; HCRYPTPROV_OR_NCRYPT_KEY_HANDLE retrievedHandle = 0; ret = CertSetCertificateContextProperty(context, -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11068
This merge request was approved by Hans Leidekker. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11068
participants (3)
-
Bernhard Übelacker -
Bernhard Übelacker (@bernhardu) -
Hans Leidekker (@hans)