Linux wireless drivers development
 help / color / mirror / Atom feed
* [patch 5/9] ath9k/htc_drv_main: off by one error
@ 2010-05-08 16:24 Dan Carpenter
  2010-05-10  4:39 ` Sujith
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-05-08 16:24 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: Jouni Malinen, Sujith Manoharan, Vasanthakumar Thiagarajan,
	Senthil Balasubramanian, John W. Linville, Vivek Natarajan,
	linux-wireless, ath9k-devel

I changed "> ATH9K_HTC_MAX_TID" to ">= ATH9K_HTC_MAX_TID" to avoid a
potential overflow.

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

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));

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-05-10  4:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-08 16:24 [patch 5/9] ath9k/htc_drv_main: off by one error Dan Carpenter
2010-05-10  4:39 ` Sujith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox