]> git.ipfire.org Git - thirdparty/qemu.git/commit
target-cris: Fix buffer overflow
authorStefan Weil <sw@weilnetz.de>
Fri, 7 Sep 2012 20:36:08 +0000 (22:36 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 9 Oct 2012 06:42:06 +0000 (01:42 -0500)
commit631287933e55adc272c57a6f8b3c09801c10c603
treee0a27818b62410302d65d7343abc4d74c753083f
parent814395979efbca6b5f0ec83f7c6a77d9fba22427
target-cris: Fix buffer overflow

Report from smatch:

target-cris/translate.c:3464 cpu_dump_state(32) error:
 buffer overflow 'env->sregs' 4 <= 255

sregs is declared 'uint32_t sregs[4][16]', so the first index must be
less than 4 or ARRAY_SIZE(env->sregs).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
target-cris/translate.c