[PATCH 2/5] d3d9: Validate D3DQUERYTYPE.
Józef Kucia
jkucia at codeweavers.com
Wed May 24 10:09:58 CDT 2017
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
dlls/d3d9/query.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dlls/d3d9/query.c b/dlls/d3d9/query.c
index 4ca2205..335a960 100644
--- a/dlls/d3d9/query.c
+++ b/dlls/d3d9/query.c
@@ -185,6 +185,12 @@ HRESULT query_init(struct d3d9_query *query, struct d3d9_device *device, D3DQUER
{
HRESULT hr;
+ if (type > D3DQUERYTYPE_MEMORYPRESSURE)
+ {
+ WARN("Invalid query type %#x.\n", type);
+ return D3DERR_NOTAVAILABLE;
+ }
+
query->IDirect3DQuery9_iface.lpVtbl = &d3d9_query_vtbl;
query->refcount = 1;
--
2.10.2
More information about the wine-patches
mailing list