|
|
a59b75 |
From 1d5aa1e3de92a5ceff6c30e48c10275c5d3ce9ac Mon Sep 17 00:00:00 2001
|
|
|
a59b75 |
From: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
a59b75 |
Date: Mon, 19 Mar 2018 14:34:58 +0100
|
|
|
a59b75 |
Subject: [PATCH 3/4] vga: add ram_addr_t cast
|
|
|
a59b75 |
|
|
|
a59b75 |
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
a59b75 |
Message-id: <20180319143459.15364-2-kraxel@redhat.com>
|
|
|
a59b75 |
Patchwork-id: 79361
|
|
|
a59b75 |
O-Subject: [RHV7.5 qemu-kvm-rhev PATCH 1/2] vga: add ram_addr_t cast
|
|
|
a59b75 |
Bugzilla: 1566878
|
|
|
a59b75 |
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
a59b75 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
a59b75 |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
a59b75 |
|
|
|
a59b75 |
Reported by Coverity.
|
|
|
a59b75 |
|
|
|
a59b75 |
Fixes: CID 1381409
|
|
|
a59b75 |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
a59b75 |
Message-id: 20171010141323.14049-4-kraxel@redhat.com
|
|
|
a59b75 |
(cherry picked from commit b0898b42ef099bc125db1fbf62b7f02b505ef3a2)
|
|
|
a59b75 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
a59b75 |
---
|
|
|
a59b75 |
hw/display/vga.c | 2 +-
|
|
|
a59b75 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
a59b75 |
|
|
|
a59b75 |
diff --git a/hw/display/vga.c b/hw/display/vga.c
|
|
|
a59b75 |
index b1cdf36..b6a3b95 100644
|
|
|
a59b75 |
--- a/hw/display/vga.c
|
|
|
a59b75 |
+++ b/hw/display/vga.c
|
|
|
a59b75 |
@@ -1488,7 +1488,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
|
|
|
a59b75 |
disp_width = width;
|
|
|
a59b75 |
|
|
|
a59b75 |
region_start = (s->start_addr * 4);
|
|
|
a59b75 |
- region_end = region_start + s->line_offset * height;
|
|
|
a59b75 |
+ region_end = region_start + (ram_addr_t)s->line_offset * height;
|
|
|
a59b75 |
if (region_end > s->vbe_size) {
|
|
|
a59b75 |
/* wraps around (can happen with cirrus vbe modes) */
|
|
|
a59b75 |
region_start = 0;
|
|
|
a59b75 |
--
|
|
|
a59b75 |
1.8.3.1
|
|
|
a59b75 |
|