Browse Source

qcacld-3.0: Check for max num of num_dscp_exceptions in limLogQosMapSet

qcacld-2.0 to qcacld-3.0 propagation
In limLogQosMapSet, dscp_exceptions is max of 21 size but
there is no limit check for num_dscp_exceptions.
Check for max size for num_dscp_exceptions to avoid overflow.

Change-Id: Ia1f64860f924aa0d586b2d0d532183ef9b18f2e0
CRs-Fixed: 933465
Agrawal Ashish 8 years ago
parent
commit
afe4ca0324
1 changed files with 2 additions and 0 deletions
  1. 2 0
      core/mac/src/sys/legacy/src/utils/src/parser_api.c

+ 2 - 0
core/mac/src/sys/legacy/src/utils/src/parser_api.c

@@ -935,6 +935,8 @@ void lim_log_operating_mode(tpAniSirGlobal pMac, tDot11fIEOperatingMode *pDot11f
 void lim_log_qos_map_set(tpAniSirGlobal pMac, tSirQosMapSet *pQosMapSet)
 {
 	uint8_t i;
+	if (pQosMapSet->num_dscp_exceptions > QOS_MAP_MAX_EX)
+		pQosMapSet->num_dscp_exceptions = QOS_MAP_MAX_EX;
 	lim_log(pMac, LOG1, FL("num of dscp exceptions : %d"),
 		pQosMapSet->num_dscp_exceptions);
 	for (i = 0; i < pQosMapSet->num_dscp_exceptions; i++) {