]> git.proxmox.com Git - mirror_qemu.git/commit
disas: cris: Fix 0 buffer length case
authorPeter Crosthwaite <crosthwaitepeter@gmail.com>
Wed, 24 Jun 2015 03:57:37 +0000 (20:57 -0700)
committerAndreas Färber <afaerber@suse.de>
Thu, 9 Jul 2015 13:20:41 +0000 (15:20 +0200)
commit51d373cf5f5a39fa315342d12ec910fe59d87090
tree4495a8658aad28abbb7bf65ff8bf06045bb50e19
parentefc6674be845e40d443b62e80eb9ea9a9adfee3c
disas: cris: Fix 0 buffer length case

Cris has the complication of variable length instructions and has
a check in place to clamp memory reads in case the disas request
doesn't have enough bytes for the instruction being disas'd. This
breaks down in the case where disassembling for the monitor where
the buffer length is defaulted to 0.

The buffer length should never be zero for a regular target_disas,
so we can safely assume the 0 case is for the monitor in which case
consider the buffer length to be the max for cris instructions.

Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
disas/cris.c