]> xenbits.xensource.com Git - qemu-upstream-4.4-testing.git/commit
cirrus: fix blit region check
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 19 Nov 2014 10:37:42 +0000 (11:37 +0100)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Thu, 5 Mar 2015 14:53:22 +0000 (14:53 +0000)
commite12ce81ee3a34902b5badb31796845734aa9b12b
treee35bf9e2dafa9e7514b1c4834446c808cb57b39a
parentf67b16a7fe5b1823606be9ffa2dce3d408a5c3f1
cirrus: fix blit region check

Issues:
 * Doesn't check pitches correctly in case it is negative.
 * Doesn't check width at all.

Turn macro into functions while being at it, also factor out the check
for one region which we then can simply call twice for src + dst.

This is CVE-2014-8106.

Reported-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
hw/display/cirrus_vga.c