From: Chen Fan Date: Fri, 19 Feb 2016 16:42:27 +0000 (-0700) Subject: pcie: modify the capability size assert X-Git-Tag: v2.6.0-rc0~95^2~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=79095ef717957e24dbcba026bb21f5990ceace88;p=thirdparty%2Fqemu.git pcie: modify the capability size assert Device's Offset and size can reach PCIE_CONFIG_SPACE_SIZE, fix the corresponding assert. Signed-off-by: Chen Fan Reviewed-by: Marcel Apfelbaum Reviewed-by: Michael S. Tsirkin Signed-off-by: Alex Williamson --- diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index 435a6cfd577..4aca0c5912f 100644 --- a/hw/pci/pcie.c +++ b/hw/pci/pcie.c @@ -608,7 +608,7 @@ void pcie_add_capability(PCIDevice *dev, assert(offset >= PCI_CONFIG_SPACE_SIZE); assert(offset < offset + size); - assert(offset + size < PCIE_CONFIG_SPACE_SIZE); + assert(offset + size <= PCIE_CONFIG_SPACE_SIZE); assert(size >= 8); assert(pci_is_express(dev));