wlan: Fix use of uninitialized variable in iw_get_range()
Static source code analysis identified two instances where
iw_get_range() is invoking ccmCfgGetStr() with the in/out length
parameter uninitialized. Modify the code to initialize the parameter
prior to invoking ccmCfgGetStr().
Change-Id: I6aca769602de12c0a95878112dd6806e4cdc9b22
CRs-fixed: 470188
diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c
index 60b2c28..d8e3b35 100644
--- a/CORE/HDD/src/wlan_hdd_wext.c
+++ b/CORE/HDD/src/wlan_hdd_wext.c
@@ -1917,6 +1917,7 @@
if (active_phy_mode == WNI_CFG_DOT11_MODE_11A || active_phy_mode == WNI_CFG_DOT11_MODE_11G)
{
/*Get the supported rates for 11G band*/
+ a_len = WNI_CFG_SUPPORTED_RATES_11A_LEN;
if (ccmCfgGetStr(hHal,
WNI_CFG_SUPPORTED_RATES_11A,
supp_rates, &a_len) == eHAL_STATUS_SUCCESS)
@@ -1939,6 +1940,7 @@
else if (active_phy_mode == WNI_CFG_DOT11_MODE_11B)
{
/*Get the supported rates for 11B band*/
+ b_len = WNI_CFG_SUPPORTED_RATES_11B_LEN;
if (ccmCfgGetStr(hHal,
WNI_CFG_SUPPORTED_RATES_11B,
supp_rates, &b_len) == eHAL_STATUS_SUCCESS)