From patchwork Fri Nov 29 15:33:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Wood X-Patchwork-Id: 3258831 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6C1169F1F4 for ; Fri, 29 Nov 2013 15:34:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5433D2051D for ; Fri, 29 Nov 2013 15:34:15 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 35C9F2068D for ; Fri, 29 Nov 2013 15:34:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 17C86FADF2; Fri, 29 Nov 2013 07:34:07 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com [74.125.82.43]) by gabe.freedesktop.org (Postfix) with ESMTP id 9F5C7FA978 for ; Fri, 29 Nov 2013 07:34:02 -0800 (PST) Received: by mail-wg0-f43.google.com with SMTP id k14so6973898wgh.22 for ; Fri, 29 Nov 2013 07:34:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=j38WFynVTqcLxCqAJLZ1PeGFdnqAACfNswt2rk4geGA=; b=Yh9oAaQbZFQJwcmThIsjYuxkDS+zKeWbvcRHCvLHzfu2TAAnK9t4bdoLkkj2a32Qxg 3hH/60tGPRZApck4a1LkzXU46el2Wtj84T0ARPPQquSAYqZQYJMiAGi6z+BMtlo0wAgM jAbU6x1HXaUEMHKYL0ABVkbuKicaYhyq3VFDTRuh/m5YLJoVdH7spaDrSIRnAMuUkMWU nqFwTY8dVOLp2g9y78Ddgtd+SHun9FaZO3vetccfigzaXKyuL9oL0h0nEh6nMp8v7KTj Z/aVTrqxernKm7kM+mynP5RbbaaRbrytiCPwqryMCgG2uFr6U7WsKVx7fn39kYY7SVhJ KYlw== X-Gm-Message-State: ALoCoQmkUoQUpY7CRjz2QMxs0wf0SXEWx0/eKGZ/pchMw6x0RsJOjAxaMH0hVXq4JTGEmG3IYpRq X-Received: by 10.194.63.228 with SMTP id j4mr25114322wjs.34.1385739240419; Fri, 29 Nov 2013 07:34:00 -0800 (PST) Received: from pistachio.icx.intel.com ([83.217.123.106]) by mx.google.com with ESMTPSA id e10sm71093140wiy.7.2013.11.29.07.33.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Nov 2013 07:33:59 -0800 (PST) From: Thomas Wood To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Subject: [PATCH 1/3] drm/edid: fix length check when adding extra 3D modes Date: Fri, 29 Nov 2013 15:33:26 +0000 Message-Id: <1385739208-19958-2-git-send-email-thomas.wood@intel.com> X-Mailer: git-send-email 1.8.4.2 In-Reply-To: <1385739208-19958-1-git-send-email-thomas.wood@intel.com> References: <1385739208-19958-1-git-send-email-thomas.wood@intel.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Thomas Wood --- drivers/gpu/drm/drm_edid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 52e060e..0a1e4a5 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -2674,7 +2674,7 @@ static int add_3d_struct_modes(struct drm_connector *connector, u16 structure, int modes = 0; u8 cea_mode; - if (video_db == NULL || video_index > video_len) + if (video_db == NULL || video_index >= video_len) return 0; /* CEA modes are numbered 1..127 */