Commit 3f1e3008 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Clear the cert pointer in MsiGetFileSignatureInformation.

parent d351a999
......@@ -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 )))
......
......@@ -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" );
}
......
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