qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Alon Levy <alevy@redhat.com>
Cc: qemu-devel@nongnu.org, kraxel@redhat.com
Subject: Re: [Qemu-devel] [PATCH] qxl/update_area_io: guest_bug on invalid parameters
Date: Mon, 30 Jul 2012 12:18:43 +0200	[thread overview]
Message-ID: <50165F83.6030701@redhat.com> (raw)
In-Reply-To: <1343555755-4122-1-git-send-email-alevy@redhat.com>

Acked-by: Hans de Goede <hdegoede@redhat.com>

On 07/29/2012 11:55 AM, Alon Levy wrote:
> Signed-off-by: Alon Levy <alevy@redhat.com>
> ---
>   hw/qxl.c | 12 ++++++++++++
>   1 file changed, 12 insertions(+)
>
> diff --git a/hw/qxl.c b/hw/qxl.c
> index 92e985b..5278541 100644
> --- a/hw/qxl.c
> +++ b/hw/qxl.c
> @@ -1405,6 +1405,18 @@ async_common:
>           QXLCookie *cookie = NULL;
>           QXLRect update = d->ram->update_area;
>
> +        if (d->ram->update_surface > NUM_SURFACES) {
> +            qxl_set_guest_bug(d, "QXL_IO_UPDATE_AREA: invalid surface id %d\n",
> +                              d->ram->update_surface);
> +            return;
> +        }
> +        if (update.left >= update.right || update.top >= update.bottom) {
> +            qxl_set_guest_bug(d,
> +                    "QXL_IO_UPDATE_AREA: invalid area (%ux%u)x(%ux%u)\n",
> +                    update.left, update.top, update.right, update.bottom);
> +            return;
> +        }
> +
>           if (async == QXL_ASYNC) {
>               cookie = qxl_cookie_new(QXL_COOKIE_TYPE_IO,
>                                       QXL_IO_UPDATE_AREA_ASYNC);
>

      reply	other threads:[~2012-07-30 10:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-29  9:55 [Qemu-devel] [PATCH] qxl/update_area_io: guest_bug on invalid parameters Alon Levy
2012-07-30 10:18 ` Hans de Goede [this message]

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=50165F83.6030701@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=alevy@redhat.com \
    --cc=kraxel@redhat.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).