Skip to content

Commit

Permalink
ath9k/htc_drv_main: off by one error
Browse files Browse the repository at this point in the history
I changed "> ATH9K_HTC_MAX_TID" to ">= ATH9K_HTC_MAX_TID" to avoid a
potential overflow.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Dan Carpenter authored and John W. Linville committed May 10, 2010
1 parent 277a64d commit 0730d11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath9k/htc_drv_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 0730d11

Please sign in to comment.