From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Alon Levy <alevy@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 6/8] hw/qxl: qxl_dirty_surfaces: use uintptr_t
Date: Mon, 8 Oct 2012 12:49:49 +0200 [thread overview]
Message-ID: <1349693391-32704-7-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1349693391-32704-1-git-send-email-kraxel@redhat.com>
From: Alon Levy <alevy@redhat.com>
As suggested by Paolo Bonzini, to avoid possible integer overflow issues.
Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/qxl.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/qxl.c b/hw/qxl.c
index 772b6c0..c246147 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1804,7 +1804,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) {
@@ -1815,7 +1815,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.1
next prev parent reply other threads:[~2012-10-08 10:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-08 10:49 [Qemu-devel] [PULL 0/8] spice patch queue Gerd Hoffmann
2012-10-08 10:49 ` [Qemu-devel] [PATCH 1/8] qxl: always update displaysurface on resize Gerd Hoffmann
2012-10-08 10:49 ` [Qemu-devel] [PATCH 2/8] qxl/update_area_io: cleanup invalid parameters handling Gerd Hoffmann
2012-10-08 10:49 ` [Qemu-devel] [PATCH 3/8] qxl: fix range check for rev3 io commands Gerd Hoffmann
2012-10-08 10:49 ` [Qemu-devel] [PATCH 4/8] hw/qxl: exit on failure to register qxl interface Gerd Hoffmann
2012-10-08 10:49 ` [Qemu-devel] [PATCH 5/8] hw/qxl: fix condition for exiting guest_bug Gerd Hoffmann
2012-10-08 10:49 ` Gerd Hoffmann [this message]
2012-10-08 10:49 ` [Qemu-devel] [PATCH 7/8] spice: raise requirement to 0.12 Gerd Hoffmann
2012-10-08 10:49 ` [Qemu-devel] [PATCH 8/8] qxl: set default revision to 4 Gerd Hoffmann
2012-10-12 16:18 ` [Qemu-devel] [PULL 0/8] spice patch queue Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1349693391-32704-7-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=alevy@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).