[PATCH] d3dcompiler_43: Fixed small overread possibility (Coverity)
Marcus Meissner
marcus at jet.franken.de
Sat Jul 7 04:51:45 CDT 2012
Hi,
CID 709038
Ciao, Marcus
---
dlls/d3dcompiler_43/utils.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/dlls/d3dcompiler_43/utils.c b/dlls/d3dcompiler_43/utils.c
index 350a116..886d506 100644
--- a/dlls/d3dcompiler_43/utils.c
+++ b/dlls/d3dcompiler_43/utils.c
@@ -1058,10 +1058,8 @@ static const char *debug_node_type(enum hlsl_ir_node_type type)
"HLSL_IR_FUNCTION_DECL",
};
- if (type > sizeof(names) / sizeof(names[0]))
- {
+ if (type >= sizeof(names) / sizeof(names[0]))
return "Unexpected node type";
- }
return names[type];
}
--
1.7.3.4
More information about the wine-patches
mailing list