Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a690f5d5 authored by Sandeep Puligilla's avatar Sandeep Puligilla Committed by Gerrit - the friendly Code Review server
Browse files

qcacld-3.0: Incorrect MCS index is passed

Fix the potential out of bound read of the supported MCS rate
array.

Change-Id: I172dcac9d1ce79b16e4cd2a4ee321d9e93102866
CRs-Fixed: 3304227
parent 511d0212
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1366,6 +1366,10 @@ static int calcuate_max_phy_rate(int mode, int nss, int ch_width,
	if (mode == SIR_SME_PHY_MODE_HT) {
		/* check for HT Mode */
		maxidx = ht_mcs_idx;
		if (maxidx > 7) {
			hdd_err("ht_mcs_idx %d is incorrect", ht_mcs_idx);
			return maxrate;
		}
		if (nss == 1) {
			supported_mcs_rate = supported_mcs_rate_nss1;
		} else if (nss == 2) {