]> git.proxmox.com Git - mirror_qemu.git/commit
xen-pt: fix Negative array index read
authorGonglei <arei.gonglei@huawei.com>
Tue, 10 Feb 2015 07:51:22 +0000 (15:51 +0800)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 10 Mar 2015 05:15:33 +0000 (08:15 +0300)
commitd4cd45028898a37afb45fb449954115b4960d4e9
tree879eaec793d6dba41194bb07c5e99eb74f30f9e1
parent277263e1b320d759a760ba6c5ea75ec268f929e5
xen-pt: fix Negative array index read

Coverity spot:
Function xen_pt_bar_offset_to_index() may return a negative
value (-1) which is used as an index to d->io_regions[] down
the line.

Let's pass index directly as an argument to
xen_pt_bar_reg_parse().

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/xen/xen_pt_config_init.c