]> xenbits.xensource.com Git - qemu-upstream-4.2-testing.git/commit
cirrus: fix blit region check
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 4 Mar 2015 18:02:55 +0000 (18:02 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Thu, 5 Mar 2015 13:22:12 +0000 (13:22 +0000)
commit008fdf412f45990e06d14d242f07511c2461e360
treeed5f5d0d4b92341603a4c488dd203dfa574afe45
parent375710483e6cc73df7276d6cfdf63dda8cbab5f2
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>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
hw/cirrus_vga.c