* [PATCH] wireless: beyond ARRAY_SIZE of intf->crypto_stats
@ 2009-05-20 0:12 Roel Kluin
2009-05-20 16:36 ` Ivo van Doorn
0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2009-05-20 0:12 UTC (permalink / raw)
To: linux-wireless; +Cc: users, Andrew Morton
Do not go beyond ARRAY_SIZE of intf->crypto_stats
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/net/wireless/rt2x00/rt2x00debug.c b/drivers/net/wireless/rt2x00/rt2x00debug.c
index 07d378e..7b3ee8c 100644
--- a/drivers/net/wireless/rt2x00/rt2x00debug.c
+++ b/drivers/net/wireless/rt2x00/rt2x00debug.c
@@ -138,7 +138,7 @@ void rt2x00debug_update_crypto(struct rt2x00_dev *rt2x00dev,
if (cipher == CIPHER_TKIP_NO_MIC)
cipher = CIPHER_TKIP;
- if (cipher == CIPHER_NONE || cipher > CIPHER_MAX)
+ if (cipher == CIPHER_NONE || cipher >= CIPHER_MAX)
return;
/* Remove CIPHER_NONE index */
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] wireless: beyond ARRAY_SIZE of intf->crypto_stats
2009-05-20 0:12 [PATCH] wireless: beyond ARRAY_SIZE of intf->crypto_stats Roel Kluin
@ 2009-05-20 16:36 ` Ivo van Doorn
0 siblings, 0 replies; 2+ messages in thread
From: Ivo van Doorn @ 2009-05-20 16:36 UTC (permalink / raw)
To: Roel Kluin; +Cc: linux-wireless, users, Andrew Morton, linville
On Wednesday 20 May 2009, Roel Kluin wrote:
> Do not go beyond ARRAY_SIZE of intf->crypto_stats
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
I really hope the previous code never resulted in a crash,
since then I would have to look into strange values coming
from the hardware. ;)
Thanks.
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
> ---
> diff --git a/drivers/net/wireless/rt2x00/rt2x00debug.c b/drivers/net/wireless/rt2x00/rt2x00debug.c
> index 07d378e..7b3ee8c 100644
> --- a/drivers/net/wireless/rt2x00/rt2x00debug.c
> +++ b/drivers/net/wireless/rt2x00/rt2x00debug.c
> @@ -138,7 +138,7 @@ void rt2x00debug_update_crypto(struct rt2x00_dev *rt2x00dev,
>
> if (cipher == CIPHER_TKIP_NO_MIC)
> cipher = CIPHER_TKIP;
> - if (cipher == CIPHER_NONE || cipher > CIPHER_MAX)
> + if (cipher == CIPHER_NONE || cipher >= CIPHER_MAX)
> return;
>
> /* Remove CIPHER_NONE index */
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-20 16:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-20 0:12 [PATCH] wireless: beyond ARRAY_SIZE of intf->crypto_stats Roel Kluin
2009-05-20 16:36 ` Ivo van Doorn
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).