From: Wei Liu Date: Tue, 7 Feb 2017 11:02:40 +0000 (+0000) Subject: fuzz/x86emul: remove bogus check against fuzzer msr index X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~2839 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4008d7774cd951eeba907b7bfe84302abfa4377c;p=xen.git fuzz/x86emul: remove bogus check against fuzzer msr index The "reg" variable in fuzz_read_msr stores the real MSR index, not an index within the fuzzer. The rest of that function already handles things correctly. We just need to remove the bogus check. Spotted by Coverity. Signed-off-by: Wei Liu Reviewed-by: Andrew Cooper --- diff --git a/tools/fuzz/x86_instruction_emulator/x86-insn-emulator-fuzzer.c b/tools/fuzz/x86_instruction_emulator/x86-insn-emulator-fuzzer.c index 3b6d33aa25..4a2bdbe392 100644 --- a/tools/fuzz/x86_instruction_emulator/x86-insn-emulator-fuzzer.c +++ b/tools/fuzz/x86_instruction_emulator/x86-insn-emulator-fuzzer.c @@ -347,9 +347,6 @@ static int fuzz_read_msr( { unsigned int idx; - if ( reg >= MSR_INDEX_MAX ) - return X86EMUL_UNHANDLEABLE; - switch ( reg ) { case MSR_TSC_AUX: