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

This commit is contained in:
Juan Lang 2008-01-08 11:40:27 -08:00 committed by Alexandre Julliard
parent 84eed025f0
commit 14a12b8861

View File

@ -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)