Marcus Meissner : d3dcompiler_43: Fixed small overread possibility ( Coverity).
Module: wine Branch: master Commit: 1f1686fddd05f83d5a444d3795688b6c4ee8b828 URL: http://source.winehq.org/git/wine.git/?a=commit;h=1f1686fddd05f83d5a444d3795... Author: Marcus Meissner <marcus(a)jet.franken.de> Date: Sat Jul 7 11:51:45 2012 +0200 d3dcompiler_43: Fixed small overread possibility (Coverity). --- 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]; }
participants (1)
-
Alexandre Julliard