[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <a6346fa583766a51b7723288fc5d73ee5ea93479.1257370735.git.inaky@linux.intel.com>
Date: Wed, 4 Nov 2009 13:39:40 -0800
From: Inaky Perez-Gonzalez <inaky@...ux.intel.com>
To: netdev@...r.kernel.org, wimax@...uxwimax.org
Cc: Roel Kluin <roel.kluin@...il.com>
Subject: [PATCH 2.6.33/1 04/12] i2400m: keep index within ms_to_errno[]
From: Roel Kluin <roel.kluin@...il.com>
Ensure that index `status' remains within ms_to_errno[]
Signed-off-by: Roel Kluin <roel.kluin@...il.com>
Signed-off-by: Inaky Perez-Gonzalez <inaky@...ux.intel.com>
---
drivers/net/wimax/i2400m/control.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wimax/i2400m/control.c b/drivers/net/wimax/i2400m/control.c
index 0730868..8fe70e7 100644
--- a/drivers/net/wimax/i2400m/control.c
+++ b/drivers/net/wimax/i2400m/control.c
@@ -263,7 +263,7 @@ int i2400m_msg_check_status(const struct i2400m_l3l4_hdr *l3l4_hdr,
if (status == 0)
return 0;
- if (status > ARRAY_SIZE(ms_to_errno)) {
+ if (status >= ARRAY_SIZE(ms_to_errno)) {
str = "unknown status code";
result = -EBADR;
} else {
--
1.6.2.5
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists