From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PULL 2/2] qxl-render: add sanity check
Date: Fri, 13 Jun 2014 13:28:00 +0200 [thread overview]
Message-ID: <1402658880-10987-3-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1402658880-10987-1-git-send-email-kraxel@redhat.com>
Verify dirty rectangle is completely within the primary surface,
just ignore it in case it isn't.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/display/qxl-render.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/display/qxl-render.c b/hw/display/qxl-render.c
index 84f1367..cc2c2b1 100644
--- a/hw/display/qxl-render.c
+++ b/hw/display/qxl-render.c
@@ -138,6 +138,12 @@ static void qxl_render_update_area_unlocked(PCIQXLDevice *qxl)
if (qemu_spice_rect_is_empty(qxl->dirty+i)) {
break;
}
+ if (qxl->dirty[i].left > qxl->dirty[i].right ||
+ qxl->dirty[i].top > qxl->dirty[i].bottom ||
+ qxl->dirty[i].right > qxl->guest_primary.surface.width ||
+ qxl->dirty[i].bottom > qxl->guest_primary.surface.height) {
+ continue;
+ }
qxl_blit(qxl, qxl->dirty+i);
dpy_gfx_update(vga->con,
qxl->dirty[i].left, qxl->dirty[i].top,
--
1.8.3.1
next prev parent reply other threads:[~2014-06-13 11:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-13 11:27 [Qemu-devel] [PULL 0/2] spice patch queue Gerd Hoffmann
2014-06-13 11:27 ` [Qemu-devel] [PULL 1/2] spice: add mouse cursor support Gerd Hoffmann
2014-06-13 11:28 ` Gerd Hoffmann [this message]
2014-06-13 15:05 ` [Qemu-devel] [PULL 0/2] spice patch queue Peter Maydell
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=1402658880-10987-3-git-send-email-kraxel@redhat.com \
--to=kraxel@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).