Commit a72af310 authored by Andrew Nguyen's avatar Andrew Nguyen Committed by Alexandre Julliard

dxdiagn: Validate the dwDxDiagHeaderVersion member in IDxDiagProvider::Initialize.

parent e1dd6a86
......@@ -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;
}
......
......@@ -61,7 +61,6 @@ static void test_Initialize(void)
params.bAllowWHQLChecks = FALSE;
params.pReserved = NULL;
hr = IDxDiagProvider_Initialize(pddp, &params);
todo_wine
ok(hr == E_INVALIDARG,
"Expected IDxDiagProvider::Initialize to return E_INVALIDARG, got %x\n", hr);
......
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