mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 19:49:43 +00:00
7c16b5bbb6
get_image_size() returns an int64_t, which pci_add_option_rom() assigns to an "int" without any range checking. A 32-bit BAR could be up to 2 GiB in size, so reject anything above it. In order to accomodate a rounded-up size of 2 GiB, change pci_patch_ids's size argument to unsigned. Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20210203131828.156467-2-pbonzini@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: David Edmondson <david.edmondson@oracle.com> |
||
---|---|---|
.. | ||
Kconfig | ||
meson.build | ||
msi.c | ||
msix.c | ||
pci_bridge.c | ||
pci_host.c | ||
pci-stub.c | ||
pci.c | ||
pcie_aer.c | ||
pcie_host.c | ||
pcie_port.c | ||
pcie.c | ||
shpc.c | ||
slotid_cap.c | ||
trace-events | ||
trace.h |