Commit 14a12b88 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

wintrust: Don't expect ImageGetCertificateData to succeed when Certificate is NULL.

parent 84eed025
......@@ -218,10 +218,10 @@ BOOL WINAPI CryptSIPGetSignedDataMsg(SIP_SUBJECTINFO* pSubjectInfo, DWORD* pdwEn
}
else
{
DWORD len;
DWORD len = 0;
ret = ImageGetCertificateData(pSubjectInfo->hFile, dwIndex, NULL, &len);
if (!ret)
if (GetLastError() != ERROR_INSUFFICIENT_BUFFER)
goto error;
pCert = HeapAlloc(GetProcessHeap(), 0, len);
if (!pCert)
......
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