]> git.proxmox.com Git - mirror_qemu.git/commitdiff
vga: add ram_addr_t cast
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 10 Oct 2017 14:13:23 +0000 (16:13 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 17 Oct 2017 07:59:00 +0000 (09:59 +0200)
Reported by Coverity.

Fixes: CID 1381409
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20171010141323.14049-4-kraxel@redhat.com

hw/display/vga.c

index 1afceb6f16086b1cf1b87843f15444fdebbcebac..1d19f6bc486609c696bc82e0a82e476089a7caa0 100644 (file)
@@ -1485,7 +1485,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;