]> git.proxmox.com Git - qemu.git/commit
qxl: Fix SPICE_RING_PROD_ITEM(), SPICE_RING_CONS_ITEM() sanity check
authorMarkus Armbruster <armbru@pond.sub.org>
Thu, 10 Jan 2013 13:24:49 +0000 (14:24 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 21 Jan 2013 20:44:31 +0000 (14:44 -0600)
commit1bd4397e8d818124dca46874dd6cb03d22828079
treeaf3dace0aadbc90340bd2b08decf86a765129160
parente76672424d3d4a3a22ef86a03729491883187583
qxl: Fix SPICE_RING_PROD_ITEM(), SPICE_RING_CONS_ITEM() sanity check

The pointer arithmetic there is safe, but ugly.  Coverity grouses
about it.  However, the actual comparison is off by one: <= end
instead of < end.  Fix by rewriting the check in a cleaner way.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit bc5f92e5db6f303e73387278e32f8669f0abf0e5)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/qxl.c