Staging: otus: beyond ARRAY_SIZE of wd->ap.wds.encryMode
authorRoel Kluin <roel.kluin@gmail.com>
Wed, 20 May 2009 00:36:29 +0000 (02:36 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 19 Jun 2009 18:00:37 +0000 (11:00 -0700)
Do not go beyond ARRAY_SIZE of wd->ap.wds.encryMode

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/otus/80211core/coid.c

index 88f8d3491a80cff8c11a91691014be1579513740..0524e1f36f0dc4534e29dc6461420b348c74fa5c 100644 (file)
@@ -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;
     }