]> xenbits.xensource.com Git - qemu-xen.git/commit
cirrus: fix oob access in mode4and5 write functions
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 11 Oct 2017 08:43:14 +0000 (10:43 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 17 Oct 2017 07:59:00 +0000 (09:59 +0200)
commiteb38e1bc3740725ca29a535351de94107ec58d51
treedd071fd63e7677672aad985e719672e267f4ded5
parentb0898b42ef099bc125db1fbf62b7f02b505ef3a2
cirrus: fix oob access in mode4and5 write functions

Move dst calculation into the loop, so we apply the mask on each
interation and will not overflow vga memory.

Cc: Prasad J Pandit <pjp@fedoraproject.org>
Reported-by: Niu Guoxiang <niuguoxiang@huawei.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20171011084314.21752-1-kraxel@redhat.com
hw/display/cirrus_vga.c