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

This commit is contained in:
Juan Lang 2008-07-11 08:54:45 -07:00 committed by Alexandre Julliard
parent e459ac84ee
commit e5e551dfbe
1 changed files with 2 additions and 2 deletions

View File

@ -413,10 +413,10 @@ static BOOL CRYPT_QueryEmbeddedMessageObject(DWORD dwObjectType,
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (file != INVALID_HANDLE_VALUE)
{
DWORD len;
DWORD len = 0;
ret = ImageGetCertificateData(file, 0, NULL, &len);
if (ret)
if (GetLastError() == ERROR_INSUFFICIENT_BUFFER)
{
WIN_CERTIFICATE *winCert = HeapAlloc(GetProcessHeap(), 0, len);