]> git.proxmox.com Git - mirror_qemu.git/commitdiff
ui/console: fix OVERFLOW_BEFORE_WIDEN
authorGonglei <arei.gonglei@huawei.com>
Wed, 11 Mar 2015 08:21:00 +0000 (16:21 +0800)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 12 Mar 2015 07:22:12 +0000 (08:22 +0100)
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/console.c

index 87af6b5b3fb7cae6d17f0283e827d4988da89c0f..b15ca87f0f27f631d3efdc00b2d424e4438181ce 100644 (file)
@@ -1285,9 +1285,9 @@ DisplaySurface *qemu_create_displaysurface_guestmem(int width, int height,
         linesize = width * PIXMAN_FORMAT_BPP(format) / 8;
     }
 
-    size = linesize * height;
+    size = (hwaddr)linesize * height;
     data = cpu_physical_memory_map(addr, &size, 0);
-    if (size != linesize * height) {
+    if (size != (hwaddr)linesize * height) {
         cpu_physical_memory_unmap(data, size, 0, 0);
         return NULL;
     }