prima: Fix possible buffer overflow in sirConvertAddtsRsp2Struct

propagation from qcacld-3.0 to qcacld-2.0
Further adapted from qcacld-2.0 to prima.

In the function sirConvertAddtsRsp2Struct, iterator j is
assigned with the value pAddTs->numTclas + addts.num_WMMTCLAS.
The j value is used as the index to the array pAddTs->tclasInfo.
Maximum limit on  pAddTs->tclasInfo entries is 2. So when the
value of j exceeds 2, then a possible buffer overflow could
occur.

Validate the value of j against SIR_MAC_TCLASIE_MAXNUM(2).

Issue: SEC-1907
Change-Id: Icc723380ed4ccd51c729194d509e288be0e0712c
CRs-Fixed: 2419829
Bug: 128798879
Bug: 123533258
Signed-off-by: Srinivas Girigowda <quic_sgirigow@quicinc.com>
(adapted from commit a1b88db1e50e0588737c41acd6a52468954d24b9)
1 file changed