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