From patchwork Sun Mar 28 11:21:18 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 88747 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2SBLnCd027577 for ; Sun, 28 Mar 2010 11:21:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753952Ab0C1LVa (ORCPT ); Sun, 28 Mar 2010 07:21:30 -0400 Received: from mail-bw0-f209.google.com ([209.85.218.209]:34260 "EHLO mail-bw0-f209.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752911Ab0C1LV3 (ORCPT ); Sun, 28 Mar 2010 07:21:29 -0400 Received: by bwz1 with SMTP id 1so2873795bwz.21 for ; Sun, 28 Mar 2010 04:21:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mail-followup-to:mime-version:content-type :content-disposition:user-agent; bh=gPZNvElVF8Y7LpefRqpJ4Mk43e3OTTO3UQXGICX01cI=; b=RPqac6pGVIOQ6+v1MtjqWrUSxEjkHyJvWSCz1DFRGEDrxUafJ0F+BtC0mwFQoOR4ja F/TulQaLCXEvyfu0FmWTUeCW5EJ7wyvZbZGgH/d66yP3/Trq3HQ0JyVwZVEscaRz0RSR D9VqKFsqWaAK8EXtwU/X+JqxrywbT2aRieg/c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mail-followup-to:mime-version :content-type:content-disposition:user-agent; b=WPNEh54lcs1nyPFG3aMMhtSX1NA7/t//LbEloVhMGDdh4we/SIEEp6ByXvHTww0fR6 AUMUADwr+prfk4JdM6dbWCyiWAxlCLusdPNYoYxmH8H0Em63yhNC8qQkMSlOl63cI/SY pusCFTaSKaCud6P7cHM7OeDGRgRuOPxwFmL/8= Received: by 10.204.6.23 with SMTP id 23mr2949533bkx.179.1269775287438; Sun, 28 Mar 2010 04:21:27 -0700 (PDT) Received: from bicker ([196.43.68.224]) by mx.google.com with ESMTPS id l1sm27181281bkl.2.2010.03.28.04.21.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 28 Mar 2010 04:21:26 -0700 (PDT) Date: Sun, 28 Mar 2010 14:21:18 +0300 From: Dan Carpenter To: Mauro Carvalho Chehab Cc: Devin Heitmueller , Michael Krufky , Laurent Pinchart , Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] video/au0828: off by one bug Message-ID: <20100328112118.GI5069@bicker> Mail-Followup-To: Dan Carpenter , Mauro Carvalho Chehab , Devin Heitmueller , Michael Krufky , Laurent Pinchart , Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sun, 28 Mar 2010 11:21:49 +0000 (UTC) diff --git a/drivers/media/video/au0828/au0828-video.c b/drivers/media/video/au0828/au0828-video.c index dc67bc4..19a5773 100644 --- a/drivers/media/video/au0828/au0828-video.c +++ b/drivers/media/video/au0828/au0828-video.c @@ -1104,7 +1104,7 @@ static int vidioc_enum_input(struct file *file, void *priv, tmp = input->index; - if (tmp > AU0828_MAX_INPUT) + if (tmp >= AU0828_MAX_INPUT) return -EINVAL; if (AUVI_INPUT(tmp).type == 0) return -EINVAL;