From patchwork Fri May 7 08:38:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 97662 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o479O5tR012811 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 7 May 2010 09:24:58 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1OAJls-0005pX-2c; Fri, 07 May 2010 09:23:00 +0000 Received: from sfi-mx-4.v28.ch3.sourceforge.com ([172.29.28.124] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1OAJ4q-0000LX-5H for dri-devel@lists.sourceforge.net; Fri, 07 May 2010 08:38:32 +0000 Received-SPF: pass (sfi-mx-4.v28.ch3.sourceforge.com: domain of gmail.com designates 74.125.82.175 as permitted sender) client-ip=74.125.82.175; envelope-from=error27@gmail.com; helo=mail-wy0-f175.google.com; Received: from mail-wy0-f175.google.com ([74.125.82.175]) by sfi-mx-4.v28.ch3.sourceforge.com with esmtp (Exim 4.69) id 1OAJ4p-0000CG-9l for dri-devel@lists.sourceforge.net; Fri, 07 May 2010 08:38:32 +0000 Received: by wyf22 with SMTP id 22so532764wyf.34 for ; Fri, 07 May 2010 01:38:25 -0700 (PDT) Received: by 10.216.184.135 with SMTP id s7mr11132027wem.212.1273221505505; Fri, 07 May 2010 01:38:25 -0700 (PDT) Received: from bicker ([205.177.176.130]) by mx.google.com with ESMTPS id k13sm816607wed.23.2010.05.07.01.38.21 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 07 May 2010 01:38:25 -0700 (PDT) Date: Fri, 7 May 2010 10:38:20 +0200 From: Dan Carpenter To: David Airlie Subject: [patch -next] drm: off by one in drm_edid.c Message-ID: <20100507083820.GX27064@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Spam-Score: 3.1 (+++) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 1.1 RCVD_IN_SORBS_WEB RBL: SORBS: sender is a abuseable web server [205.177.176.130 listed in dnsbl.sorbs.net] 1.5 RCVD_IN_PSBL RBL: Received via a relay in PSBL [205.177.176.130 listed in psbl.surriel.com] -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record -0.0 DKIM_VERIFIED Domain Keys Identified Mail: signature passes verification 0.0 DKIM_SIGNED Domain Keys Identified Mail: message has a signature 1.5 SF_NO_SPF_SPAM SF_NO_SPF_SPAM 0.4 AWL AWL: From: address is in the auto white-list X-Headers-End: 1OAJ4p-0000CG-9l X-Mailman-Approved-At: Fri, 07 May 2010 09:22:59 +0000 Cc: Dave Airlie , dri-devel@lists.sourceforge.net X-BeenThere: dri-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.sourceforge.net X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 07 May 2010 09:24:59 +0000 (UTC) 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,