wlan: Fix Crash in csrProcessScanCommand
While moving smeConfig to heap from stack
in hdd_set_sme_config memzero passed with
wrong arguments (passed pointer instead of
primitive type) which lead to remain
garbage into the fscantwice ini value.
Change-Id: I6b8f536f37f92519a2a7e036d18d1ba77cfea774
CRs-Fixed: 716656
diff --git a/CORE/SME/src/csr/csrApiScan.c b/CORE/SME/src/csr/csrApiScan.c
index 2af4e78..04dda62 100644
--- a/CORE/SME/src/csr/csrApiScan.c
+++ b/CORE/SME/src/csr/csrApiScan.c
@@ -5821,7 +5821,7 @@
{
len = pCommand->u.scanCmd.u.scanRequest.ChannelInfo.numOfChannels;
//allocate twice the channel
- newChannelInfo.ChannelList = (tANI_U8 *)vos_mem_malloc(newChannelInfo.numOfChannels * 2);
+ newChannelInfo.ChannelList = (tANI_U8 *)vos_mem_malloc(len * 2);
pChannel = pCommand->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList;
}
else