Re: [Qemu-devel] [PATCH v2] target-cris: Fix buffer overflow

2012-09-07 Thread Edgar E. Iglesias
On Fri, Sep 07, 2012 at 10:36:08PM +0200, Stefan Weil wrote: > 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).

[Qemu-devel] [PATCH v2] target-cris: Fix buffer overflow

2012-09-07 Thread Stefan Weil
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 --- I did not fix tabs, therefore checkpatch