提交 f76b84a0 编写于 作者: G Gonglei 提交者: Gerd Hoffmann

ui/console: fix OVERFLOW_BEFORE_WIDEN

Signed-off-by: NGonglei <arei.gonglei@huawei.com>
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 8c7d0645
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册