yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
169b9a
From c7db4596ac0794d7feaea30fcc5f3a05aa7210c3 Mon Sep 17 00:00:00 2001
6920d8
From: Gerd Hoffmann <kraxel@redhat.com>
6920d8
Date: Mon, 9 Apr 2018 13:27:35 +0200
169b9a
Subject: [PATCH 01/10] vga: add ram_addr_t cast
6920d8
6920d8
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
6920d8
Message-id: <20180409132736.24598-2-kraxel@redhat.com>
6920d8
Patchwork-id: 79513
6920d8
O-Subject: [RHEL-7.5 qemu-kvm PATCH 1/2] vga: add ram_addr_t cast
169b9a
Bugzilla: 1553670
6920d8
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
6920d8
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
6920d8
RH-Acked-by: John Snow <jsnow@redhat.com>
6920d8
6920d8
Reported by Coverity.
6920d8
6920d8
Fixes: CID 1381409
6920d8
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
6920d8
Message-id: 20171010141323.14049-4-kraxel@redhat.com
6920d8
(cherry picked from commit b0898b42ef099bc125db1fbf62b7f02b505ef3a2)
6920d8
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
6920d8
---
6920d8
 hw/display/vga.c | 2 +-
6920d8
 1 file changed, 1 insertion(+), 1 deletion(-)
6920d8
6920d8
diff --git a/hw/display/vga.c b/hw/display/vga.c
6920d8
index 017e951..8e6c6d6 100644
6920d8
--- a/hw/display/vga.c
6920d8
+++ b/hw/display/vga.c
6920d8
@@ -1534,7 +1534,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
6920d8
     disp_width = width;
6920d8
 
6920d8
     region_start = (s->start_addr * 4);
6920d8
-    region_end = region_start + s->line_offset * height;
6920d8
+    region_end = region_start + (ram_addr_t)s->line_offset * height;
6920d8
     if (region_end > s->vbe_size) {
6920d8
         /* wraps around (can happen with cirrus vbe modes) */
6920d8
         region_start = 0;
6920d8
-- 
6920d8
1.8.3.1
6920d8