[PATCH 06/10] d3d10_1: Validate parameters in D3D10CreateDevice1().
Józef Kucia
jkucia at codeweavers.com
Fri Mar 4 04:43:32 CST 2016
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
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 a619004..d0ca213 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);
--
2.4.10
More information about the wine-patches
mailing list