From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: kraxel@redhat.com
Subject: [Qemu-devel] [PATCH] qxl: Slot sanity check in qxl_phys2virt() is off by one, fix
Date: Fri, 4 Nov 2011 10:34:24 +0100 [thread overview]
Message-ID: <1320399264-28581-1-git-send-email-armbru@redhat.com> (raw)
Spotted by Coverity.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
hw/qxl.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/hw/qxl.c b/hw/qxl.c
index 84ffd45..c97bebe 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1006,7 +1006,7 @@ void *qxl_phys2virt(PCIQXLDevice *qxl, QXLPHYSICAL pqxl, int group_id)
case MEMSLOT_GROUP_HOST:
return (void*)offset;
case MEMSLOT_GROUP_GUEST:
- PANIC_ON(slot > NUM_MEMSLOTS);
+ PANIC_ON(slot >= NUM_MEMSLOTS);
PANIC_ON(!qxl->guest_slots[slot].active);
PANIC_ON(offset < qxl->guest_slots[slot].delta);
offset -= qxl->guest_slots[slot].delta;
--
1.7.6.4
next reply other threads:[~2011-11-04 9:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-04 9:34 Markus Armbruster [this message]
2011-11-09 12:33 ` [Qemu-devel] [PATCH] qxl: Slot sanity check in qxl_phys2virt() is off by one, fix Gerd Hoffmann
2012-01-17 9:08 ` Markus Armbruster
2012-01-17 11:57 ` Alon Levy
2012-01-17 15:50 ` Gerd Hoffmann
-- strict thread matches above, loose matches on Subject: below --
2012-01-17 15:51 [Qemu-devel] [PULL] tiny spice patch queue Gerd Hoffmann
2012-01-17 15:51 ` [Qemu-devel] [PATCH] qxl: Slot sanity check in qxl_phys2virt() is off by one, fix Gerd Hoffmann
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=1320399264-28581-1-git-send-email-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=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).