Module: wine Branch: master Commit: 3f1e3008ea9027d3982fb3d0175f119bc32154f4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=3f1e3008ea9027d3982fb3d017...
Author: Hans Leidekker hans@codeweavers.com Date: Wed Mar 28 15:34:26 2012 +0200
msi: Clear the cert pointer in MsiGetFileSignatureInformation.
---
dlls/msi/msi.c | 1 + dlls/msi/tests/msi.c | 2 ++ 2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index 4022b3a..53ae641 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -2580,6 +2580,7 @@ HRESULT WINAPI MsiGetFileSignatureInformationW( LPCWSTR path, DWORD flags, PCCER data.dwProvFlags = 0; data.dwUIContext = WTD_UICONTEXT_INSTALL; hr = WinVerifyTrustEx( INVALID_HANDLE_VALUE, &generic_verify_v2, &data ); + *cert = NULL; if (FAILED(hr)) goto done;
if (!(signer = WTHelperGetProvSignerFromChain( data.hWVTStateData, 0, FALSE, 0 ))) diff --git a/dlls/msi/tests/msi.c b/dlls/msi/tests/msi.c index 59f996a..aaf1f42 100644 --- a/dlls/msi/tests/msi.c +++ b/dlls/msi/tests/msi.c @@ -11794,8 +11794,10 @@ static void test_MsiGetFileSignatureInformation(void) hr = MsiGetFileSignatureInformationA( "signature.bin", 0, NULL, NULL, &len ); ok(hr == E_INVALIDARG, "expected E_INVALIDARG got 0x%08x\n", hr);
+ cert = (const CERT_CONTEXT *)0xdeadbeef; hr = MsiGetFileSignatureInformationA( "signature.bin", 0, &cert, NULL, &len ); todo_wine ok(hr == HRESULT_FROM_WIN32(ERROR_FUNCTION_FAILED), "got 0x%08x\n", hr); + ok(cert == NULL, "got %p\n", cert);
DeleteFileA( "signature.bin" ); }