]> xenbits.xensource.com Git - qemu-xen-4.6-testing.git/commit
cirrus_vga: fix division by 0 for color expansion rop
authorAurelien Jarno <aurelien@aurel32.net>
Tue, 4 Jan 2011 20:58:24 +0000 (21:58 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 16 Oct 2015 15:52:06 +0000 (16:52 +0100)
commitfd7c9bfa4955fa8c32bbaaa2b515ed2414ef9bc5
tree8795a2c5b89cd4c009dd60747923e6cb6ddc4f42
parent8a1e383df25477e21b48c67c93c3a4dde19f9e4f
cirrus_vga: fix division by 0 for color expansion rop

Commit d85d0d3883f5a567fa2969a0396e42e0a662b3fa introduces a regression
with Windows ME that leads to a division by 0 and a crash.

It uses the color expansion rop with the source pitch set to 0. This is
something allowed, as the manual explicitely says "When the source of
color-expand data is display memory, the source pitch is ignored.".

This patch fixes this regression by computing sx, sy and others
variables only if they are going to be used later, that is for a plain
copy ROP. It basically consists in moving code.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
hw/cirrus_vga.c