wlan: Fix for Static analysis issues in vos_nvitem.c
The 'request->alpha2' of size 2 is passed to sme_ChangeCountryCode
but in sme_ChangeCountryCode it is considered as size of 3.
Pass ccode of length 3 to sme_ChangeCountryCode insted of
request->alpha2.
Change-Id: I579c29e038565e21555bc555e3e3fa6473398293
CRs-Fixed: 633938
diff --git a/CORE/VOSS/src/vos_nvitem.c b/CORE/VOSS/src/vos_nvitem.c
index dfb4c4a..dea9a69 100644
--- a/CORE/VOSS/src/vos_nvitem.c
+++ b/CORE/VOSS/src/vos_nvitem.c
@@ -3997,6 +3997,8 @@
{
int status;
wiphy_dbg(wiphy, "info: set by user\n");
+ memset(ccode, 0, WNI_CFG_COUNTRY_CODE_LEN);
+ memcpy(ccode, request->alpha2, 2);
init_completion(&change_country_code);
/* We will process hints by user from nl80211 in driver.
* sme_ChangeCountryCode will set the country to driver
@@ -4012,7 +4014,7 @@
status = sme_ChangeCountryCode(pHddCtx->hHal,
(void *)(tSmeChangeCountryCallback)
vos_nv_change_country_code_cb,
- request->alpha2,
+ ccode,
&change_country_code,
pHddCtx->pvosContext,
eSIR_FALSE,