qcacld-2.0: Add bounday check for multicastAddr array

In hdd_set_rx_filter API multicastAddr array being accessed beyond
its size.

Add boundary check for multicastAddr.

CRs-Fixed: 1104565
Change-Id: I8e1543a8f42ac40c04d2c6a17e69718d13cbd706
This commit is contained in:
Manjeet Singh 2016-12-22 18:17:17 +05:30 committed by syphyr
parent e3c1463f86
commit d752ac5ce3
1 changed files with 2 additions and 0 deletions

View File

@ -4625,6 +4625,8 @@ static int hdd_set_rx_filter(hdd_adapter_t *adapter, bool action,
MAC_ADDR_ARRAY(filter->multicastAddr[j]));
j++;
}
if (j == SIR_MAX_NUM_MULTICAST_ADDRESS)
break;
}
filter->ulMulticastAddrCnt = j;
/* Set rx filter */