Ensure that index `status' remains within ms_to_errno[]

Signed-off-by: Roel Kluin <[email protected]>
---
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 {
_______________________________________________
wimax mailing list
[email protected]
http://lists.linuxwimax.org/listinfo/wimax

Reply via email to