Re: [Qemu-devel] [PATCH 1/2] xen-pt: fix Negative array index read

2015-02-09 Thread Stefano Stabellini
On Sat, 31 Jan 2015, arei.gong...@huawei.com wrote: > From: Gonglei > > Coverity spot: > Function xen_pt_bar_offset_to_index() may returns a negative > number (-1) value index, which as an index to array d->io_regions. > > Let's directly and simply pass index as an argument to > xen_pt_bar_reg_p

[Qemu-devel] [PATCH 1/2] xen-pt: fix Negative array index read

2015-01-30 Thread arei.gonglei
From: Gonglei Coverity spot: Function xen_pt_bar_offset_to_index() may returns a negative number (-1) value index, which as an index to array d->io_regions. Let's directly and simply pass index as an argument to xen_pt_bar_reg_parse(). Signed-off-by: Gonglei --- hw/xen/xen_pt_config_init.c |