]> xenbits.xensource.com Git - qemu-upstream-4.3-testing.git/commit
cirrus: fix blit region check
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 4 Mar 2015 18:02:43 +0000 (18:02 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Thu, 5 Mar 2015 13:21:57 +0000 (13:21 +0000)
commit41bb09c458c8268f0d24f1246b1fa1eceb4cd364
tree20d56266c5bb7de162d1f06217928bf3beda59a6
parent080b7f3a6f11bb724926d9aab364c4f660960489
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