Fixed bug in mibset_mibget where an out of bounds array incident was occuring when adding more than MAX_PRISM2 allowed groups.

This commit is contained in:
joellen 2000-01-27 06:22:20 +00:00
parent 085bdb8ddd
commit eb24c59a15
2 changed files with 4 additions and 4 deletions

View File

@ -43,7 +43,8 @@
/*=============================================================*/
/*------ Constants --------------------------------------------*/
#define MAX_GRP_ADDR (32)
#define MAX_GRP_ADDR (32)
#define MAX_PRISM2_GRP_ADDR (16)
/*=============================================================*/
/*------ Macros -----------------------------------------------*/

View File

@ -555,7 +555,7 @@ int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp)
} else {
if ( (result = prism2mgmt_SetGroupAddress(mibitem->did, bytebuf,
pstr, priv)) == 0 ) {
if ( (priv->grpcnt) <= MAX_GRP_ADDR ) {
if ( (priv->grpcnt) <= MAX_PRISM2_GRP_ADDR ) {
memcpy( bytebuf,
priv->GroupAddresses[0],
((priv->grpcnt) * WLAN_ADDR_LEN));
@ -566,8 +566,7 @@ int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp)
} else {
/* clear group addresses in card
and set to promiscuous mode */
memset( bytebuf, 0,
((priv->grpcnt) * WLAN_ADDR_LEN));
memset( bytebuf, 0, sizeof(bytebuf));
result = hfa384x_drvr_setconfig( hw,
HFA384x_RID_GROUPADDR,
bytebuf, 0);