public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [BUG] Intel xorg driver 2.20.2 overlay off-by-one bug
Date: Mon, 13 Aug 2012 19:27:23 +0100	[thread overview]
Message-ID: <1344882450_87175@CP5-2952> (raw)
In-Reply-To: <20120812090144.GC18957@n2100.arm.linux.org.uk>

On Sun, 12 Aug 2012 10:01:44 +0100, Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> While reading through the Intel driver code, I spotted this in
> I830SetPortAttributeOverlay:
> 
>         } else if (attribute == xvPipe) {
>                 xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
>                 if ((value < -1) || (value > xf86_config->num_crtc))
>                         return BadValue;
>                 if (value < 0)
>                         adaptor_priv->desired_crtc = NULL;
>                 else
>                         adaptor_priv->desired_crtc = xf86_config->crtc[value];
> 
> This allows value == xf86_config->num_crtc to be valid, which would be
> the CRTC number _after_ the last one in the array.  Presumably this is
> not desired, and the test should be ">=".

Thanks for bringing this to our attention and poking Dave, who promptly
pushed a patch to fix the bug.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

      reply	other threads:[~2012-08-13 18:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-12  9:01 [BUG] Intel xorg driver 2.20.2 overlay off-by-one bug Russell King - ARM Linux
2012-08-13 18:27 ` Chris Wilson [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=1344882450_87175@CP5-2952 \
    --to=chris@chris-wilson.co.uk \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux@arm.linux.org.uk \
    /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