From bef514cda88ea8583b2588a3a1d1c8226f332a1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Tue, 12 Jul 2016 22:23:24 +0200 Subject: [PATCH] wifi: (fixes #2445) Fix out of bounds array access in MinstrelHtWifiManager::SetBestProbabilityRate (patch from Alexander Krotov and Matias Richart) --- RELEASE_NOTES | 1 + src/wifi/model/minstrel-ht-wifi-manager.cc | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 175581758..6e4ba4cf1 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -79,6 +79,7 @@ Bugs fixed - Bug 2442 - TrafficControl makes ConfigStore crash - Bug 2443 - Increase applications counters to accomodate Gbps transfer rates. - Bug 2444 - PcapHelper DataLinkType enum should have a name +- Bug 2445 - Out of bounds array access in MinstrelHtWifiManager::SetBestProbabilityRate - Bug 2446 - Comma instead of pipe in Attributes Known issues diff --git a/src/wifi/model/minstrel-ht-wifi-manager.cc b/src/wifi/model/minstrel-ht-wifi-manager.cc index 78f1cab4b..cf6b3162a 100644 --- a/src/wifi/model/minstrel-ht-wifi-manager.cc +++ b/src/wifi/model/minstrel-ht-wifi-manager.cc @@ -1430,7 +1430,8 @@ MinstrelHtWifiManager::SetBestProbabilityRate (MinstrelHtWifiRemoteStation *stat { station->m_maxProbRate = index; } - if (rate.ewmaProb > group->m_ratesTable[group->m_maxProbRate].ewmaProb) + maxGPRateId = GetRateId (group->m_maxProbRate); + if (rate.ewmaProb > group->m_ratesTable[maxGPRateId].ewmaProb) { group->m_maxProbRate = index; }