diff --git a/dlls/crypt32/crl.c b/dlls/crypt32/crl.c index 9ae0d5d8aad..a1138b5ed67 100644 --- a/dlls/crypt32/crl.c +++ b/dlls/crypt32/crl.c @@ -275,7 +275,7 @@ static BOOL CRLContext_GetHashProp(PCCRL_CONTEXT context, DWORD dwPropId, { BOOL ret = CryptHashCertificate(0, algID, 0, toHash, toHashLen, pvData, pcbData); - if (ret) + if (ret && pvData) { CRYPT_DATA_BLOB blob = { *pcbData, pvData }; diff --git a/dlls/crypt32/ctl.c b/dlls/crypt32/ctl.c index 65691bbf8a9..42abcd73346 100644 --- a/dlls/crypt32/ctl.c +++ b/dlls/crypt32/ctl.c @@ -505,7 +505,7 @@ static BOOL CTLContext_GetHashProp(PCCTL_CONTEXT context, DWORD dwPropId, { BOOL ret = CryptHashCertificate(0, algID, 0, toHash, toHashLen, pvData, pcbData); - if (ret) + if (ret && pvData) { CRYPT_DATA_BLOB blob = { *pcbData, pvData };