wlan: HDD: initialize temp variable before use.
In function __wlan_hdd_cfg80211_get_station, temp will be accessed
uninitialized in case value of sinfo->signal is greater than rssi
values of rssiMcsTbl array.
Initialising temp to number of rows in supported_mcs_rate.
Change-Id: I3fafaf7f1483f5ce3892395a86640f64aef98f65
CRs-Fixed: 703678
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 81e101d..15a266e 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -11754,6 +11754,7 @@
rateFlag |= 2;
}
+ temp = sizeof(supported_mcs_rate) / sizeof(supported_mcs_rate[0]);
if (rssidx == 1 || rssidx == 2)
{
//get middle rate MCS index if rssi=1/2
@@ -11766,10 +11767,6 @@
}
}
}
- else
- {
- temp = sizeof(supported_mcs_rate) / sizeof(supported_mcs_rate[0]);
- }
for (i = 0; i < MCSLeng; i++)
{