From: Gerd Hoffmann <kraxel@redhat.com>
To: hangaohuai <hangaohuai@huawei.com>
Cc: qemu-devel@nongnu.org, fangying1@huawei.com, arei.gonglei@huawei.com
Subject: Re: [Qemu-devel] [PATCH] fix :cirrus_vga fix OOB read case qemu Segmentation fault
Date: Mon, 13 Mar 2017 14:55:07 +0100 [thread overview]
Message-ID: <1489413307.13264.21.camel@redhat.com> (raw)
In-Reply-To: <20170313131029.14044-1-hangaohuai@huawei.com>
> @@ -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 && (dstpitch < 0 || srcpitch < 0)) {
... matching the check of the non-transparent version a few lines up in
the same source file?
cheers,
Gerd
next prev parent reply other threads:[~2017-03-13 13:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-13 13:10 [Qemu-devel] [PATCH] fix :cirrus_vga fix OOB read case qemu Segmentation fault hangaohuai
2017-03-13 13:55 ` Gerd Hoffmann [this message]
2017-03-13 14:56 ` Gonglei (Arei)
2017-03-13 15:25 ` Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1489413307.13264.21.camel@redhat.com \
--to=kraxel@redhat.com \
--cc=arei.gonglei@huawei.com \
--cc=fangying1@huawei.com \
--cc=hangaohuai@huawei.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).