]>
Commit | Line | Data |
---|---|---|
3dcc8d3b | 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
c53dfb57 WB |
2 | From: Gerd Hoffmann <kraxel@redhat.com> |
3 | Date: Tue, 10 Oct 2017 16:13:23 +0200 | |
3dcc8d3b | 4 | Subject: [PATCH] vga: add ram_addr_t cast |
c53dfb57 WB |
5 | |
6 | Reported by Coverity. | |
7 | ||
8 | Fixes: CID 1381409 | |
9 | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> | |
10 | Message-id: 20171010141323.14049-4-kraxel@redhat.com | |
11 | --- | |
12 | hw/display/vga.c | 2 +- | |
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
14 | ||
15 | diff --git a/hw/display/vga.c b/hw/display/vga.c | |
16 | index 7bdbf7441e..63ba404ef2 100644 | |
17 | --- a/hw/display/vga.c | |
18 | +++ b/hw/display/vga.c | |
19 | @@ -1485,7 +1485,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update) | |
20 | disp_width = width; | |
21 | ||
22 | region_start = (s->start_addr * 4); | |
23 | - region_end = region_start + s->line_offset * height; | |
24 | + region_end = region_start + (ram_addr_t)s->line_offset * height; | |
25 | if (region_end > s->vbe_size) { | |
26 | /* wraps around (can happen with cirrus vbe modes) */ | |
27 | region_start = 0; | |
28 | -- | |
29 | 2.11.0 | |
30 |