dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: David Airlie <airlied@linux.ie>
Cc: Dave Airlie <airlied@redhat.com>, dri-devel@lists.sourceforge.net
Subject: [patch -next] drm: off by one in drm_edid.c
Date: Fri, 7 May 2010 10:38:20 +0200	[thread overview]
Message-ID: <20100507083820.GX27064@bicker> (raw)

m == num_est3_modes is one past the end of the est3_modes[]. 

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 7188674..46447b0 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -1383,7 +1383,7 @@ drm_est3_modes(struct drm_connector *connector, struct detailed_timing *timing)
 	for (i = 0; i < 6; i++) {
 		for (j = 7; j > 0; j--) {
 			m = (i * 8) + (7 - j);
-			if (m > num_est3_modes)
+			if (m >= num_est3_modes)
 				break;
 			if (est[i] & (1 << j)) {
 				mode = drm_find_dmt(connector->dev,

------------------------------------------------------------------------------

--

             reply	other threads:[~2010-05-07  8:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-07  8:38 Dan Carpenter [this message]
2010-05-10 16:03 ` [patch -next] drm: off by one in drm_edid.c Adam Jackson

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=20100507083820.GX27064@bicker \
    --to=error27@gmail.com \
    --cc=airlied@linux.ie \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.sourceforge.net \
    /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