projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6dbbf05
)
hw/display/qxl: Assert memory slot fits in preallocated MemoryRegion
author
Philippe Mathieu-Daudé
<philmd@linaro.org>
Mon, 28 Nov 2022 20:27:41 +0000
(21:27 +0100)
committer
Stefan Hajnoczi
<stefanha@redhat.com>
Tue, 29 Nov 2022 23:15:26 +0000
(18:15 -0500)
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <
20221128202741
.4945-6-philmd@linaro.org>
hw/display/qxl.c
patch
|
blob
|
history
diff --git
a/hw/display/qxl.c
b/hw/display/qxl.c
index 0b21626aadead230847899be8069a7e0e0eb0ef9..6772849dec2831b1a4e8750a83e8d07b5d2e392d 100644
(file)
--- a/
hw/display/qxl.c
+++ b/
hw/display/qxl.c
@@
-1384,6
+1384,7
@@
static int qxl_add_memslot(PCIQXLDevice *d, uint32_t slot_id, uint64_t delta,
qxl_set_guest_bug(d, "%s: pci_region = %d", __func__, pci_region);
return 1;
}
+ assert(guest_end - pci_start <= memory_region_size(mr));
virt_start = (intptr_t)memory_region_get_ram_ptr(mr);
memslot.slot_id = slot_id;