wintrust: Don't expect ImageGetCertificateData to succeed when Certificate is NULL.
This commit is contained in:
parent
84eed025f0
commit
14a12b8861
|
@ -218,10 +218,10 @@ BOOL WINAPI CryptSIPGetSignedDataMsg(SIP_SUBJECTINFO* pSubjectInfo, DWORD* pdwEn
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DWORD len;
|
DWORD len = 0;
|
||||||
|
|
||||||
ret = ImageGetCertificateData(pSubjectInfo->hFile, dwIndex, NULL, &len);
|
ret = ImageGetCertificateData(pSubjectInfo->hFile, dwIndex, NULL, &len);
|
||||||
if (!ret)
|
if (GetLastError() != ERROR_INSUFFICIENT_BUFFER)
|
||||||
goto error;
|
goto error;
|
||||||
pCert = HeapAlloc(GetProcessHeap(), 0, len);
|
pCert = HeapAlloc(GetProcessHeap(), 0, len);
|
||||||
if (!pCert)
|
if (!pCert)
|
||||||
|
|
Loading…
Reference in New Issue