From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PULL 3/4] vga: add ram_addr_t cast
Date: Tue, 17 Oct 2017 10:25:01 +0200 [thread overview]
Message-ID: <20171017082502.7885-4-kraxel@redhat.com> (raw)
In-Reply-To: <20171017082502.7885-1-kraxel@redhat.com>
Reported by Coverity.
Fixes: CID 1381409
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20171010141323.14049-4-kraxel@redhat.com
---
hw/display/vga.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/display/vga.c b/hw/display/vga.c
index 1afceb6f16..1d19f6bc48 100644
--- a/hw/display/vga.c
+++ b/hw/display/vga.c
@@ -1485,7 +1485,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
disp_width = width;
region_start = (s->start_addr * 4);
- region_end = region_start + s->line_offset * height;
+ region_end = region_start + (ram_addr_t)s->line_offset * height;
if (region_end > s->vbe_size) {
/* wraps around (can happen with cirrus vbe modes) */
region_start = 0;
--
2.9.3
next prev parent reply other threads:[~2017-10-17 8:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-17 8:24 [Qemu-devel] [PULL 0/4] Vga 20171017 patches Gerd Hoffmann
2017-10-17 8:24 ` [Qemu-devel] [PULL 1/4] vga: drop line_offset variable Gerd Hoffmann
2017-10-17 8:25 ` [Qemu-devel] [PULL 2/4] vga: handle cirrus vbe mode wraparounds Gerd Hoffmann
2017-10-17 8:25 ` Gerd Hoffmann [this message]
2017-10-17 8:25 ` [Qemu-devel] [PULL 4/4] cirrus: fix oob access in mode4and5 write functions Gerd Hoffmann
2017-10-19 11:09 ` [Qemu-devel] [PULL 0/4] Vga 20171017 patches 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=20171017082502.7885-4-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).