]> git.proxmox.com Git - pve-qemu.git/blobdiff - debian/patches/extra/0019-vga-add-ram_addr_t-cast.patch
bump version to 2.9.1-3~pve4
[pve-qemu.git] / debian / patches / extra / 0019-vga-add-ram_addr_t-cast.patch
diff --git a/debian/patches/extra/0019-vga-add-ram_addr_t-cast.patch b/debian/patches/extra/0019-vga-add-ram_addr_t-cast.patch
new file mode 100644 (file)
index 0000000..85f800b
--- /dev/null
@@ -0,0 +1,30 @@
+From 918868b77c7a04d3e2aa7bbc7f9255dafe75f709 Mon Sep 17 00:00:00 2001
+From: Gerd Hoffmann <kraxel@redhat.com>
+Date: Tue, 10 Oct 2017 16:13:23 +0200
+Subject: [PATCH 19/23] vga: add ram_addr_t cast
+
+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 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/hw/display/vga.c b/hw/display/vga.c
+index 7bdbf7441e..63ba404ef2 100644
+--- a/hw/display/vga.c
++++ b/hw/display/vga.c
+@@ -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;
+-- 
+2.11.0
+