]> git.proxmox.com Git - mirror_qemu.git/commit
xenfb.c: avoid expensive loops when prod <= out_cons
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Wed, 6 Jan 2016 16:32:22 +0000 (16:32 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Thu, 14 Jan 2016 16:49:11 +0000 (16:49 +0000)
commitac0487e1d2ae811cd4d035741a109a4ecfb013f1
tree200aac3b8918640a4f467cf9901c728d5f6dfd50
parent9027ac50fdd66577a978c6363e3fb52e130d86e7
xenfb.c: avoid expensive loops when prod <= out_cons

If the frontend sets out_cons to a value higher than out_prod, it will
cause xenfb_handle_events to loop about 2^32 times. Avoid that by using
better checks at the beginning of the function.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Reported-by: Ling Liu <liuling-it@360.cn>
hw/display/xenfb.c