=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: d3d10core: Fix out of bounds access (Coverity).

Alexandre Julliard julliard at wine.codeweavers.com
Mon Sep 22 15:01:13 CDT 2014


Module: wine
Branch: master
Commit: 8a7d4c7f224737af7f6f9cc18a8737b6ab41f232
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=8a7d4c7f224737af7f6f9cc18a8737b6ab41f232

Author: André Hentschel <nerv at dawncrow.de>
Date:   Mon Sep 22 20:41:58 2014 +0200

d3d10core: Fix out of bounds access (Coverity).

---

 dlls/d3d10core/async.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/d3d10core/async.c b/dlls/d3d10core/async.c
index 830b2b4..71a30cc 100644
--- a/dlls/d3d10core/async.c
+++ b/dlls/d3d10core/async.c
@@ -196,7 +196,7 @@ HRESULT d3d10_query_init(struct d3d10_query *query, struct d3d10_device *device,
         /* D3D10_QUERY_SO_OVERFLOW_PREDICATE    */  WINED3D_QUERY_TYPE_SO_OVERFLOW,
     };
 
-    if (desc->Query > sizeof(query_type_map) / sizeof(*query_type_map))
+    if (desc->Query >= sizeof(query_type_map) / sizeof(*query_type_map))
     {
         FIXME("Unhandled query type %#x.\n", desc->Query);
         return E_INVALIDARG;




More information about the wine-cvs mailing list