Fixes a crash in the Windows Live Messenger 8.5 installer, bug 19004,
http://bugs.winehq.org/show_bug.cgi?id=19004--Juan
[0023-Only-close-a-file-in-SoftpubCleanup-if-the-WINTRUST_.patch]
From d8077b3db3cb780aea784e6f7e2ba4fdc54162ce Mon Sep 17 00:00:00 2001
From: Juan Lang <juan.lang@...>
Date: Tue, 3 Nov 2009 16:15:32 -0800
Subject: [PATCH] Only close a file in SoftpubCleanup if the WINTRUST_DATA contains a WINTRUST_FILE_INFO
---
dlls/wintrust/softpub.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/wintrust/softpub.c b/dlls/wintrust/softpub.c
index 1db4b47..47b76b2 100644
--- a/dlls/wintrust/softpub.c
+++ b/dlls/wintrust/softpub.c
@@ -1078,7 +1078,8 @@ HRESULT WINAPI SoftpubCleanup(CRYPT_PROVIDER_DATA *data)
CryptMsgClose(data->hMsg);
- if (data->fOpenedFile)
+ if (data->fOpenedFile &&
+ data->pWintrustData->dwUnionChoice == WTD_CHOICE_FILE)
CloseHandle(data->pWintrustData->u.pFile->hFile);
return S_OK;
--
1.6.0.6