crypt32: Don't crash when querying the length of the hash of a CRL or a CTL.

This commit is contained in:
Juan Lang 2008-12-22 19:32:41 -08:00 committed by Alexandre Julliard
parent defe641725
commit 00c50a6732
2 changed files with 2 additions and 2 deletions

View File

@ -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 };

View File

@ -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 };