]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
vga: add ram_addr_t cast
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 10 Oct 2017 14:13:23 +0000 (16:13 +0200)
committerAnthony PERARD <anthony.perard@citrix.com>
Mon, 1 Apr 2019 16:09:57 +0000 (17:09 +0100)
Reported by Coverity.

Fixes: CID 1381409
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20171010141323.14049-4-kraxel@redhat.com
(cherry picked from commit b0898b42ef099bc125db1fbf62b7f02b505ef3a2)

hw/display/vga.c

index b1cdf36cfa325d639dfb904275c44734a5c14aba..b6a3b95c9309de92deb89a64c4bdf46ac14dc1bc 100644 (file)
@@ -1488,7 +1488,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
     disp_width = width;
 
     region_start = (s->start_addr * 4);
-    region_end = region_start + s->line_offset * height;
+    region_end = region_start + (ram_addr_t)s->line_offset * height;
     if (region_end > s->vbe_size) {
         /* wraps around (can happen with cirrus vbe modes) */
         region_start = 0;