qemu-e2k/target-cris
zhanghailiang fae38221e7 target-cris/translate.c: fix out of bounds read
In function t_gen_mov_TN_preg and t_gen_mov_preg_TN, The begin check about the
validity of in-parameter 'r' is useless. We still access cpu_PR[r] in the
follow code if it is invalid. Which will be an out-of-bounds read error.

Fix it by using assert() to ensure it is valid before using it.

Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-11-17 13:59:23 +01:00
..
Makefile.objs cpu: Introduce CPUClass::gdb_{read,write}_register() 2013-07-27 00:04:17 +02:00
cpu-qom.h target-cris: Use cpu_exec_interrupt qom hook 2014-09-25 18:54:21 +01:00
cpu.c gdbstub: Allow target CPUs to specify watchpoint STOP_BEFORE_ACCESS flag 2014-10-06 14:25:43 +01:00
cpu.h cpu: Move breakpoints field from CPU_COMMON to CPUState 2014-03-13 19:20:47 +01:00
crisv10-decode.h Update to a hopefully more future proof FSF address 2010-03-07 15:48:43 +00:00
crisv32-decode.h janitor: add guards to headers 2012-12-19 08:31:31 +01:00
gdbstub.c target-cris: Factor out CPUClass::gdb_read_register() hook for v10 2013-07-27 00:04:17 +02:00
helper.c target-cris: Use cpu_exec_interrupt qom hook 2014-09-25 18:54:21 +01:00
helper.h tcg: Invert the inclusion of helper.h 2014-05-28 09:33:54 -07:00
machine.c Convert machine registration to use module init functions 2009-05-21 08:47:55 -05:00
mmu.c cputlb: Change tlb_flush_page() argument to CPUState 2014-03-13 19:52:47 +01:00
mmu.h target-cris: Don't overuse CPUState 2012-03-14 22:20:25 +01:00
op_helper.c softmmu: introduce cpu_ldst.h 2014-06-05 16:10:33 +02:00
opcode-cris.h target-cris/opcode-cris.h: rename REG_PC/SP to CRIS_REG_PC/SP 2011-08-20 01:41:01 +02:00
translate.c target-cris/translate.c: fix out of bounds read 2014-11-17 13:59:23 +01:00
translate_v10.c target-cris/translate.c: Remove t_gen_mov_TN_reg and t_gen_mov_reg_TN 2014-06-09 01:04:44 +02:00