[PATCH] [staging] beyond ARRAY_SIZE of wd->ap.wds.encryMode

From: Roel Kluin
Date: Tue May 19 2009 - 20:36:41 EST


Do not go beyond ARRAY_SIZE of wd->ap.wds.encryMode

Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>
---
diff --git a/drivers/staging/otus/80211core/coid.c b/drivers/staging/otus/80211core/coid.c
index 88f8d34..0524e1f 100644
--- a/drivers/staging/otus/80211core/coid.c
+++ b/drivers/staging/otus/80211core/coid.c
@@ -2013,7 +2013,7 @@ u16_t zfiConfigWdsPort(zdev_t* dev, u8_t wdsPortId, u16_t flag, u16_t* wdsAddr,

zmw_get_wlan_dev(dev);

- if (wdsPortId > ZM_MAX_WDS_SUPPORT)
+ if (wdsPortId >= ZM_MAX_WDS_SUPPORT)
{
return ZM_ERR_WDS_PORT_ID;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/