From a72af3100d9b7e478634435ef64f53fbaa3e9d2c Mon Sep 17 00:00:00 2001 From: Andrew Nguyen Date: Tue, 22 Dec 2009 04:15:18 -0600 Subject: [PATCH] dxdiagn: Validate the dwDxDiagHeaderVersion member in IDxDiagProvider::Initialize. --- dlls/dxdiagn/provider.c | 3 ++- dlls/dxdiagn/tests/provider.c | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/dxdiagn/provider.c b/dlls/dxdiagn/provider.c index 1100940b873..6075c9dc791 100644 --- a/dlls/dxdiagn/provider.c +++ b/dlls/dxdiagn/provider.c @@ -96,7 +96,8 @@ static HRESULT WINAPI IDxDiagProviderImpl_Initialize(PDXDIAGPROVIDER iface, DXDI if (NULL == pParams) { return E_POINTER; } - if (pParams->dwSize != sizeof(DXDIAG_INIT_PARAMS)) { + if (pParams->dwSize != sizeof(DXDIAG_INIT_PARAMS) || + pParams->dwDxDiagHeaderVersion != DXDIAG_DX9_SDK_VERSION) { return E_INVALIDARG; } diff --git a/dlls/dxdiagn/tests/provider.c b/dlls/dxdiagn/tests/provider.c index 52670c0930e..47732bc84dc 100644 --- a/dlls/dxdiagn/tests/provider.c +++ b/dlls/dxdiagn/tests/provider.c @@ -61,7 +61,6 @@ static void test_Initialize(void) params.bAllowWHQLChecks = FALSE; params.pReserved = NULL; hr = IDxDiagProvider_Initialize(pddp, ¶ms); - todo_wine ok(hr == E_INVALIDARG, "Expected IDxDiagProvider::Initialize to return E_INVALIDARG, got %x\n", hr);