From: Christophe Fergeau <cfergeau@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: spice-devel@lists.freedesktop.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Spice-devel] [PATCH] qxl: add sanity check
Date: Thu, 20 Feb 2014 12:05:47 +0100 [thread overview]
Message-ID: <20140220110546.GA8099@teriyaki.redhat.com> (raw)
In-Reply-To: <1392806450-3452-1-git-send-email-kraxel@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1429 bytes --]
Looks good, ACK.
Christophe
On Wed, Feb 19, 2014 at 11:40:50AM +0100, Gerd Hoffmann wrote:
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> hw/display/qxl.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/hw/display/qxl.c b/hw/display/qxl.c
> index 1471cc0..2a559eb 100644
> --- a/hw/display/qxl.c
> +++ b/hw/display/qxl.c
> @@ -1429,7 +1429,7 @@ static int qxl_destroy_primary(PCIQXLDevice *d, qxl_async_io async)
> return 1;
> }
>
> -static void qxl_set_mode(PCIQXLDevice *d, int modenr, int loadvm)
> +static void qxl_set_mode(PCIQXLDevice *d, unsigned int modenr, int loadvm)
> {
> pcibus_t start = d->pci.io_regions[QXL_RAM_RANGE_INDEX].addr;
> pcibus_t end = d->pci.io_regions[QXL_RAM_RANGE_INDEX].size + start;
> @@ -1439,6 +1439,12 @@ static void qxl_set_mode(PCIQXLDevice *d, int modenr, int loadvm)
> .mem_start = start,
> .mem_end = end
> };
> +
> + if (modenr >= d->modes->n_modes) {
> + qxl_set_guest_bug(d, "mode number out of range");
> + return;
> + }
> +
> QXLSurfaceCreate surface = {
> .width = mode->x_res,
> .height = mode->y_res,
> --
> 1.8.3.1
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
[-- Attachment #2: Type: application/pgp-signature, Size: 181 bytes --]
prev parent reply other threads:[~2014-02-20 11:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-19 10:40 [Qemu-devel] [PATCH] qxl: add sanity check Gerd Hoffmann
2014-02-19 11:32 ` Laszlo Ersek
2014-02-20 11:05 ` Christophe Fergeau [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=20140220110546.GA8099@teriyaki.redhat.com \
--to=cfergeau@redhat.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=spice-devel@lists.freedesktop.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).