diff options
author | Gonglei <arei.gonglei@huawei.com> | 2015-03-11 16:21:00 +0800 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2015-03-12 08:22:12 +0100 |
commit | f76b84a04b75e98eee56e8dc277564d0fbb99018 (patch) | |
tree | 39bb9f40f71b8b627107992701933ddf8dbe0508 | |
parent | 8c7d06457311b13bc65c9b24df5d895b2826b8c5 (diff) |
ui/console: fix OVERFLOW_BEFORE_WIDEN
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r-- | ui/console.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/console.c b/ui/console.c index 87af6b5b3f..b15ca87f0f 100644 --- a/ui/console.c +++ b/ui/console.c @@ -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; } |