Commit aa16c89b authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

crypt32: NULL ptr could leak into function (Coverity).

parent cd028045
......@@ -4628,8 +4628,13 @@ BOOL WINAPI CryptEncodeObjectEx(DWORD dwCertEncodingType, LPCSTR lpszStructType,
}
SetLastError(NOERROR);
if (dwFlags & CRYPT_ENCODE_ALLOC_FLAG && pvEncoded)
if (dwFlags & CRYPT_ENCODE_ALLOC_FLAG) {
if (!pvEncoded) {
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
*(BYTE **)pvEncoded = NULL;
}
encodeFunc = CRYPT_GetBuiltinEncoder(dwCertEncodingType, lpszStructType);
if (!encodeFunc)
{
......
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