From: Anoob Soman Date: Wed, 5 Jul 2017 13:56:35 +0000 (+0100) Subject: xen/pt: Fixup addr validation in xen_pt_pci_config_access_check X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4daf62594d13dfca2ce3a74dd3bddee5f54d7127;p=qemu.git xen/pt: Fixup addr validation in xen_pt_pci_config_access_check xen_pt_pci_config_access_check checks if addr >= 0xFF. 0xFF is a valid address and should not be ignored. Signed-off-by: Anoob Soman Acked-by: Anthony PERARD Signed-off-by: Stefano Stabellini --- diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c index b6d71bb52a..375efa68f6 100644 --- a/hw/xen/xen_pt.c +++ b/hw/xen/xen_pt.c @@ -85,7 +85,7 @@ void xen_pt_log(const PCIDevice *d, const char *f, ...) static int xen_pt_pci_config_access_check(PCIDevice *d, uint32_t addr, int len) { /* check offset range */ - if (addr >= 0xFF) { + if (addr > 0xFF) { XEN_PT_ERR(d, "Failed to access register with offset exceeding 0xFF. " "(addr: 0x%02x, len: %d)\n", addr, len); return -1;