Paolo Bonzini d2ba7ecb34 cirrus_vga: fix off-by-one in blit_region_is_unsafe
The "max" value is being compared with >=, but addr + width points to
the first byte that will _not_ be copied.  Laszlo suggested using a
"greater than" comparison, instead of subtracting one like it is
already done above for the height, so that max remains always positive.

The mistake is "safe"---it will reject some blits, but will never cause
out-of-bounds writes.

Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-id: 1455121059-18280-1-git-send-email-pbonzini@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2016-03-01 07:51:32 +01:00
..
2016-02-23 12:43:05 +00:00
2016-02-23 12:43:05 +00:00
2016-02-25 13:14:19 +02:00
2016-02-23 12:43:05 +00:00
2016-02-19 10:50:37 +00:00
2016-02-11 15:15:47 +03:00
2016-02-23 12:43:05 +00:00
2016-02-25 13:14:19 +02:00