Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/crypt32/msg.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c index f37c462aa9..26f2616fdd 100644 --- a/dlls/crypt32/msg.c +++ b/dlls/crypt32/msg.c @@ -567,7 +567,12 @@ static HCRYPTMSG CHashEncodeMsg_Open(DWORD dwFlags, const void *pvMsgEncodeInfo, prov = info->hCryptProv; else { - prov = I_CryptGetDefaultCryptProv(0); + prov = I_CryptGetDefaultCryptProv(algID); + if (!prov) + { + SetLastError(E_INVALIDARG); + return NULL; + } dwFlags &= ~CMSG_CRYPT_RELEASE_CONTEXT_FLAG; } msg = CryptMemAlloc(sizeof(CHashEncodeMsg));