Blame 0516-hw-qxl-qxl_dirty_surfaces-use-uintptr_t.patch
|
Hans de Goede |
64c339 |
From d59685f5667e25d0805bde93c068052afb30efda Mon Sep 17 00:00:00 2001
|
|
Hans de Goede |
64c339 |
From: Alon Levy <alevy@redhat.com>
|
|
Hans de Goede |
64c339 |
Date: Sun, 7 Oct 2012 17:03:35 +0200
|
|
Hans de Goede |
64c339 |
Subject: [PATCH 516/647] hw/qxl: qxl_dirty_surfaces: use uintptr_t
|
|
Hans de Goede |
64c339 |
|
|
Hans de Goede |
64c339 |
As suggested by Paolo Bonzini, to avoid possible integer overflow issues.
|
|
Hans de Goede |
64c339 |
|
|
Hans de Goede |
64c339 |
Signed-off-by: Alon Levy <alevy@redhat.com>
|
|
Hans de Goede |
64c339 |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Hans de Goede |
64c339 |
---
|
|
Hans de Goede |
64c339 |
hw/qxl.c | 4 ++--
|
|
Hans de Goede |
64c339 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
Hans de Goede |
64c339 |
|
|
Hans de Goede |
64c339 |
diff --git a/hw/qxl.c b/hw/qxl.c
|
|
Hans de Goede |
64c339 |
index e3a164a..5a9bf1c 100644
|
|
Hans de Goede |
64c339 |
--- a/hw/qxl.c
|
|
Hans de Goede |
64c339 |
+++ b/hw/qxl.c
|
|
Hans de Goede |
64c339 |
@@ -1803,7 +1803,7 @@ static void qxl_hw_text_update(void *opaque, console_ch_t *chardata)
|
|
Hans de Goede |
64c339 |
|
|
Hans de Goede |
64c339 |
static void qxl_dirty_surfaces(PCIQXLDevice *qxl)
|
|
Hans de Goede |
64c339 |
{
|
|
Hans de Goede |
64c339 |
- intptr_t vram_start;
|
|
Hans de Goede |
64c339 |
+ uintptr_t vram_start;
|
|
Hans de Goede |
64c339 |
int i;
|
|
Hans de Goede |
64c339 |
|
|
Hans de Goede |
64c339 |
if (qxl->mode != QXL_MODE_NATIVE && qxl->mode != QXL_MODE_COMPAT) {
|
|
Hans de Goede |
64c339 |
@@ -1814,7 +1814,7 @@ static void qxl_dirty_surfaces(PCIQXLDevice *qxl)
|
|
Hans de Goede |
64c339 |
qxl_set_dirty(&qxl->vga.vram, qxl->shadow_rom.draw_area_offset,
|
|
Hans de Goede |
64c339 |
qxl->shadow_rom.surface0_area_size);
|
|
Hans de Goede |
64c339 |
|
|
Hans de Goede |
64c339 |
- vram_start = (intptr_t)memory_region_get_ram_ptr(&qxl->vram_bar);
|
|
Hans de Goede |
64c339 |
+ vram_start = (uintptr_t)memory_region_get_ram_ptr(&qxl->vram_bar);
|
|
Hans de Goede |
64c339 |
|
|
Hans de Goede |
64c339 |
/* dirty the off-screen surfaces */
|
|
Hans de Goede |
64c339 |
for (i = 0; i < qxl->ssd.num_surfaces; i++) {
|
|
Hans de Goede |
64c339 |
--
|
|
Hans de Goede |
64c339 |
1.7.12.1
|
|
Hans de Goede |
64c339 |
|