From patchwork Sat May 8 16:24:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 97921 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 o48GOJLA010908 for ; Sat, 8 May 2010 16:24:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753859Ab0EHQYS (ORCPT ); Sat, 8 May 2010 12:24:18 -0400 Received: from mail-qy0-f183.google.com ([209.85.221.183]:53037 "EHLO mail-qy0-f183.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753702Ab0EHQYR (ORCPT ); Sat, 8 May 2010 12:24:17 -0400 Received: by qyk13 with SMTP id 13so3447598qyk.1 for ; Sat, 08 May 2010 09:24:17 -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:mime-version:content-type:content-disposition:user-agent; bh=Y/6W2Npww6A0yKzmulyTjJ8acRmGu7og9Jv54a2ukHU=; b=MAn1Uh81BDQ0bFUTERY/t70ZDrjzqUSoc6FJ6YjC8XEPHPIoyE42fV3jdllY3qPic9 IOBiqme2SXgrrXhQ+OiETvCkKe7EFyQQi2tK5WZjgFFnikJ9SIOU+WCb65eT6TG4A/jp xeI8wI3OE3AY7EUz3sU9C/azDRt/m3EsRgdaQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=iotdcTfY8WpnxDszo19gayBeFZyOA01d9rMIcuFRbveO/958smvbV4fprbPeEx4pKe 7DVohu7g1+IACNsbMrvpn/lGHo36AdvpMOSbVioUQeiNr+wnugXftIztbdWXIXvi5yLu Q0vXTvzVXPnHozYk/ocFZwQKCwsm97ukZhbk4= Received: by 10.229.235.202 with SMTP id kh10mr1260313qcb.78.1273335856842; Sat, 08 May 2010 09:24:16 -0700 (PDT) Received: from bicker ([205.177.176.130]) by mx.google.com with ESMTPS id f5sm2073899qcg.2.2010.05.08.09.24.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 08 May 2010 09:24:16 -0700 (PDT) Date: Sat, 8 May 2010 18:24:02 +0200 From: Dan Carpenter To: "Luis R. Rodriguez" Cc: Jouni Malinen , Sujith Manoharan , Vasanthakumar Thiagarajan , Senthil Balasubramanian , "John W. Linville" , Vivek Natarajan , linux-wireless@vger.kernel.org, ath9k-devel@venema.h4ckr.net Subject: [patch 5/9] ath9k/htc_drv_main: off by one error Message-ID: <20100508162402.GQ27064@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@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]); Sat, 08 May 2010 16:24:19 +0000 (UTC) diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index e75db06..6c386da 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c @@ -465,7 +465,7 @@ static int ath9k_htc_aggr_oper(struct ath9k_htc_priv *priv, int ret = 0; u8 cmd_rsp; - if (tid > ATH9K_HTC_MAX_TID) + if (tid >= ATH9K_HTC_MAX_TID) return -EINVAL; memset(&aggr, 0, sizeof(struct ath9k_htc_target_aggr));