Commit e5e551df authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

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

parent e459ac84
......@@ -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);
......
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