* [ath9k-devel] [patch] ath9k_htc: check for underflow in ath9k_htc_rx_msg()
@ 2015-11-06 10:01 Dan Carpenter
2015-11-26 12:05 ` [ath9k-devel] " Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2015-11-06 10:01 UTC (permalink / raw)
To: ath9k-devel
We check for overflow here, but we don't check for underflow so it
causes a static checker warning.
Fixes: fb9987d0f748 ('ath9k_htc: Support for AR9271 chipset.')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/net/wireless/ath/ath9k/htc_hst.c b/drivers/net/wireless/ath/ath9k/htc_hst.c
index 2294709..fd85f996 100644
--- a/drivers/net/wireless/ath/ath9k/htc_hst.c
+++ b/drivers/net/wireless/ath/ath9k/htc_hst.c
@@ -414,7 +414,7 @@ void ath9k_htc_rx_msg(struct htc_target *htc_handle,
return;
}
- if (epid >= ENDPOINT_MAX) {
+ if (epid < 0 || epid >= ENDPOINT_MAX) {
if (pipe_id != USB_REG_IN_PIPE)
dev_kfree_skb_any(skb);
else
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [ath9k-devel] ath9k_htc: check for underflow in ath9k_htc_rx_msg()
2015-11-06 10:01 [ath9k-devel] [patch] ath9k_htc: check for underflow in ath9k_htc_rx_msg() Dan Carpenter
@ 2015-11-26 12:05 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2015-11-26 12:05 UTC (permalink / raw)
To: ath9k-devel
> We check for overflow here, but we don't check for underflow so it
> causes a static checker warning.
>
> Fixes: fb9987d0f748 ('ath9k_htc: Support for AR9271 chipset.')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Thanks, applied to wireless-drivers-next.git.
Kalle Valo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-26 12:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-06 10:01 [ath9k-devel] [patch] ath9k_htc: check for underflow in ath9k_htc_rx_msg() Dan Carpenter
2015-11-26 12:05 ` [ath9k-devel] " Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).