Juan Lang : crypt32: Don' t crash when querying the length of the hash of a CRL or a CTL.
Alexandre Julliard
julliard at winehq.org
Tue Dec 23 13:41:37 CST 2008
Module: wine
Branch: master
Commit: 00c50a6732fa009596aaf4f96e94cb933a196b85
URL: http://source.winehq.org/git/wine.git/?a=commit;h=00c50a6732fa009596aaf4f96e94cb933a196b85
Author: Juan Lang <juan.lang at gmail.com>
Date: Mon Dec 22 19:32:41 2008 -0800
crypt32: Don't crash when querying the length of the hash of a CRL or a CTL.
---
dlls/crypt32/crl.c | 2 +-
dlls/crypt32/ctl.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/crypt32/crl.c b/dlls/crypt32/crl.c
index 9ae0d5d..a1138b5 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 65691bb..42abcd7 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 };
More information about the wine-cvs
mailing list