crypt32: Handle NULL ptr leak in CryptDecodeObjectEx (Coverity).

This commit is contained in:
Marcus Meissner 2010-12-31 12:50:36 +01:00 committed by Alexandre Julliard
parent 80d12c358e
commit 896be41143
1 changed files with 8 additions and 1 deletions

View File

@ -5976,8 +5976,15 @@ BOOL WINAPI CryptDecodeObjectEx(DWORD dwCertEncodingType, LPCSTR lpszStructType,
}
SetLastError(NOERROR);
if (dwFlags & CRYPT_DECODE_ALLOC_FLAG && pvStructInfo)
if (dwFlags & CRYPT_DECODE_ALLOC_FLAG)
{
if (!pvStructInfo)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
*(BYTE **)pvStructInfo = NULL;
}
decodeFunc = CRYPT_GetBuiltinDecoder(dwCertEncodingType, lpszStructType);
if (!decodeFunc)
{