Blame SOURCES/kvm-vga-add-ram_addr_t-cast.patch

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