Commit 896be411 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

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

parent 80d12c35
......@@ -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)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment