qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] hw/qxl: qxl_dirty_surfaces: use uintptr_t
@ 2012-10-07 15:03 Alon Levy
  2012-10-08 11:10 ` Gerd Hoffmann
  0 siblings, 1 reply; 2+ messages in thread
From: Alon Levy @ 2012-10-07 15:03 UTC (permalink / raw)
  To: qemu-devel, kraxel

As suggested by Paolo Bonzini, to avoid possible integer overflow issues.

Signed-off-by: Alon Levy <alevy@redhat.com>
---
 hw/qxl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/qxl.c b/hw/qxl.c
index 4effb66..97ae22a 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1811,7 +1811,7 @@ static void qxl_hw_text_update(void *opaque, console_ch_t *chardata)
 
 static void qxl_dirty_surfaces(PCIQXLDevice *qxl)
 {
-    intptr_t vram_start;
+    uintptr_t vram_start;
     int i;
 
     if (qxl->mode != QXL_MODE_NATIVE && qxl->mode != QXL_MODE_COMPAT) {
@@ -1822,7 +1822,7 @@ static void qxl_dirty_surfaces(PCIQXLDevice *qxl)
     qxl_set_dirty(&qxl->vga.vram, qxl->shadow_rom.draw_area_offset,
                   qxl->shadow_rom.surface0_area_size);
 
-    vram_start =  (intptr_t)memory_region_get_ram_ptr(&qxl->vram_bar);
+    vram_start = (uintptr_t)memory_region_get_ram_ptr(&qxl->vram_bar);
 
     /* dirty the off-screen surfaces */
     for (i = 0; i < qxl->ssd.num_surfaces; i++) {
-- 
1.7.12.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/qxl: qxl_dirty_surfaces: use uintptr_t
  2012-10-07 15:03 [Qemu-devel] [PATCH] hw/qxl: qxl_dirty_surfaces: use uintptr_t Alon Levy
@ 2012-10-08 11:10 ` Gerd Hoffmann
  0 siblings, 0 replies; 2+ messages in thread
From: Gerd Hoffmann @ 2012-10-08 11:10 UTC (permalink / raw)
  To: Alon Levy; +Cc: qemu-devel

On 10/07/12 17:03, Alon Levy wrote:
> As suggested by Paolo Bonzini, to avoid possible integer overflow issues.

Patch added to spice patch queue, likewise the other two qxl fixes.

thanks,
  Gerd

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-08 11:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-07 15:03 [Qemu-devel] [PATCH] hw/qxl: qxl_dirty_surfaces: use uintptr_t Alon Levy
2012-10-08 11:10 ` Gerd Hoffmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).