Commit 7223d8b6 authored by Paul Chitescu's avatar Paul Chitescu Committed by Alexandre Julliard

crypt32: Check the result of CryptAcquireContextW() when initializing default provider.

parent 15d7b7b7
......@@ -64,8 +64,9 @@ HCRYPTPROV CRYPT_GetDefaultProvider(void)
{
HCRYPTPROV prov;
CryptAcquireContextW(&prov, NULL, MS_ENHANCED_PROV_W, PROV_RSA_FULL,
CRYPT_VERIFYCONTEXT);
if (!CryptAcquireContextW(&prov, NULL, MS_ENHANCED_PROV_W, PROV_RSA_FULL,
CRYPT_VERIFYCONTEXT))
return hDefProv;
InterlockedCompareExchangePointer((PVOID *)&hDefProv, (PVOID)prov,
NULL);
if (hDefProv != prov)
......
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