From faf302ce4dda45a314e2efd1cee3acce7a7e069a Mon Sep 17 00:00:00 2001 From: gaurank kathpalia Date: Thu, 12 Jul 2018 16:07:16 +0530 Subject: [PATCH] Revert "qcacld-3.0: Fix OOB write in lim_populate_peer_rate_set" The driver checks the MAX Supported rates and if found greater than MAX_RATES (12 in case of 11b/g), the driver returns failure in populate peer rates, and sends all rates as zero to FW in peer-assoc. This reverts commit I75d5f5b5e7d44665101dae6e095b4adadc1781fb Change-Id: I85d696d3de89ce4f581de7d81542603407a68e87 CRs-Fixed: 2277588 --- core/mac/src/pe/lim/lim_assoc_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c index 9a189c10cbcb..ebd7de9c4bd6 100644 --- a/core/mac/src/pe/lim/lim_assoc_utils.c +++ b/core/mac/src/pe/lim/lim_assoc_utils.c @@ -1691,7 +1691,7 @@ lim_populate_peer_rate_set(tpAniSirGlobal pMac, } } else tempRateSet2.numRates = 0; - if ((tempRateSet.numRates + tempRateSet2.numRates) >= + if ((tempRateSet.numRates + tempRateSet2.numRates) > SIR_MAC_RATESET_EID_MAX) { pe_err("more than 12 rates in CFG"); return QDF_STATUS_E_FAILURE;