From: Gerd Hoffmann Date: Tue, 9 May 2017 10:48:39 +0000 (+0200) Subject: vga: fix display update region calculation X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=bfc56535f793c557aa754c50213fc5f882e6482d;p=qemu.git vga: fix display update region calculation vga display update mis-calculated the region for the dirty bitmap snapshot in case the scanlines are padded. This can triggere an assert in cpu_physical_memory_snapshot_get_dirty(). Fixes: fec5e8c92becad223df9d972770522f64aafdb72 Reported-by: Kevin Wolf Reported-by: 李强 Signed-off-by: Gerd Hoffmann Message-id: 20170509104839.19415-1-kraxel@redhat.com --- diff --git a/hw/display/vga.c b/hw/display/vga.c index b2516c8d21..dcc95f88e2 100644 --- a/hw/display/vga.c +++ b/hw/display/vga.c @@ -1630,7 +1630,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update) if (!full_update) { vga_sync_dirty_bitmap(s); snap = memory_region_snapshot_and_clear_dirty(&s->vram, addr1, - bwidth * height, + line_offset * height, DIRTY_MEMORY_VGA); }