From 59193b0c47488385dbae86857c20b82190e7a653 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Fri, 4 Mar 2016 11:43:32 +0100 Subject: [PATCH] d3d10_1: Validate parameters in D3D10CreateDevice1(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/d3d10_1/d3d10_1_main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dlls/d3d10_1/d3d10_1_main.c b/dlls/d3d10_1/d3d10_1_main.c index a619004cabb..d0ca213af8b 100644 --- a/dlls/d3d10_1/d3d10_1_main.c +++ b/dlls/d3d10_1/d3d10_1_main.c @@ -73,6 +73,14 @@ HRESULT WINAPI D3D10CreateDevice1(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE drive adapter, debug_d3d10_driver_type(driver_type), swrast, flags, debug_d3d10_feature_level(hw_level), sdk_version, device); + if (!device) + return E_INVALIDARG; + + *device = NULL; + + if (!hw_level) + return E_INVALIDARG; + if (adapter) { IDXGIAdapter_AddRef(adapter);