vmsvga: correct bitmap and pixmap size checks
commit167d97a3def77ee2dbf6e908b0ecbfe2103977db
authorPrasad J Pandit <pjp@fedoraproject.org>
Thu, 8 Sep 2016 12:45:54 +0000 (8 18:15 +0530)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 13 Sep 2016 07:24:35 +0000 (13 09:24 +0200)
treeaa11611ba71df6ccf0c06efb072dda184e396935
parent7263da78045dc91cc207f350911efe4259e99b3c
vmsvga: correct bitmap and pixmap size checks

When processing svga command DEFINE_CURSOR in vmsvga_fifo_run,
the computed BITMAP and PIXMAP size are checked against the
'cursor.mask[]' and 'cursor.image[]' array sizes in bytes.
Correct these checks to avoid OOB memory access.

Reported-by: Qinghao Tang <luodalongde@gmail.com>
Reported-by: Li Qiang <liqiang6-s@360.cn>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Message-id: 1473338754-15430-1-git-send-email-ppandit@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/display/vmware_vga.c