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
1 changed files with 2 additions and 2 deletions

View File

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