Marcus Meissner : d3dx9_36: Fixed off by 1 in the usage_idx check (Coverity ).

Alexandre Julliard julliard at winehq.org
Wed May 26 11:49:07 CDT 2010


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

Author: Marcus Meissner <marcus at jet.franken.de>
Date:   Tue May 25 23:40:59 2010 +0200

d3dx9_36: Fixed off by 1 in the usage_idx check (Coverity).

---

 dlls/d3dx9_36/bytecodewriter.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/d3dx9_36/bytecodewriter.c b/dlls/d3dx9_36/bytecodewriter.c
index 384fed3..055b8ef 100644
--- a/dlls/d3dx9_36/bytecodewriter.c
+++ b/dlls/d3dx9_36/bytecodewriter.c
@@ -435,7 +435,7 @@ static HRESULT vs_find_builtin_varyings(struct bc_writer *This, const struct bwr
                 break;
 
             case BWRITERDECLUSAGE_TEXCOORD:
-                if(usage_idx > 8) {
+                if(usage_idx >= 8) {
                     WARN("dcl_color%u not supported in sm 1/2 shaders\n", usage_idx);
                     return E_INVALIDARG;
                 }




More information about the wine-cvs mailing list