Hi,
> commit d16136d22af0fcf0d651de04c9e3cbc7137cc6f9
> Author: Benjamin Herrenschmidt
> Date: Mon Jul 7 10:32:34 2014 +1000
>
> cirrus: Fix host CPU blits
> So does v2 is needed?
Yes, otherwise we will end up with a regression
similar to the one fixed by ben.
cheers,
Gerd
Hi Gerd,
Thanks for rapid reply :)
> -Original Message-
> From: Gerd Hoffmann [mailto:kra...@redhat.com]
> Sent: Monday, March 13, 2017 9:55 PM
> To: Hangaohuai
> Cc: qemu-devel@nongnu.org; fangying; Gonglei (Arei)
> Subject: Re: [Qemu-devel] [PATCH] fix :cirrus_vga
> @@ -97,6 +97,11 @@ glue(glue(cirrus_bitblt_rop_fwd_transp_,
> ROP_NAME),_8)(CirrusVGAState *s,
> uint8_t p;
> dstpitch -= bltwidth;
> srcpitch -= bltwidth;
> +
> +if (dstpitch < 0 || srcpitch < 0) {
> +return;
> +}
Shouldn't that be ...
if (bltheight > 1 && (
check the validity of parameters in cirrus_bitblt_rop_fwd_transp_xxx
and cirrus_bitblt_rop_fwd_xxx to avoid the OOB read which causes qemu
Segmentation fault.
After the fix, we will touch the assert in
cirrus_invalidate_region:
assert(off_cur_end >= off_cur);
Signed-off-by: fangying
Signed-off-