diff options
| author | Padma, Santhosh Kumar <skpadma@qti.qualcomm.com> | 2015-04-15 19:02:33 +0530 |
|---|---|---|
| committer | AnjaneeDevi Kapparapu <c_akappa@qti.qualcomm.com> | 2015-05-15 17:24:05 +0530 |
| commit | d6a79d9f062c859fefb308545363128703ff1052 (patch) | |
| tree | 1db7910a82c209ccc4263d0c2df372cd277b98f2 | |
| parent | 321907a3033d3c093d95b55776e5d81be82837b4 (diff) | |
wlan: Fix for issue reported by Static Analysis tool
In limSendProbeRspMgmtFrame(), initialization of struct
'extractedExtCap' is inside a if condition, which would
result uninitialized access of struct if addIEpresent fails.
Moved memset of structure 'extractedExtCap' to immediately
after its declaration.
Change-Id: I33ffb0b3b3959106a2174fbadaf5313dbe229be9
CRs-Fixed: 668666
| -rw-r--r-- | CORE/MAC/src/pe/lim/limSendManagementFrames.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/CORE/MAC/src/pe/lim/limSendManagementFrames.c b/CORE/MAC/src/pe/lim/limSendManagementFrames.c index 73d78ea3fb1d..2dc589fbd3ca 100644 --- a/CORE/MAC/src/pe/lim/limSendManagementFrames.c +++ b/CORE/MAC/src/pe/lim/limSendManagementFrames.c @@ -740,6 +740,8 @@ limSendProbeRspMgmtFrame(tpAniSirGlobal pMac, return; } + vos_mem_set(( tANI_U8* )&extractedExtCap, sizeof( tDot11fIEExtCap ), 0); + // Fill out 'frm', after which we'll just hand the struct off to // 'dot11fPackProbeResponse'. vos_mem_set(( tANI_U8* )pFrm, sizeof( tDot11fProbeResponse ), 0); @@ -908,8 +910,6 @@ limSendProbeRspMgmtFrame(tpAniSirGlobal pMac, return; } - vos_mem_set(( tANI_U8* )&extractedExtCap, - sizeof( tDot11fIEExtCap ), 0); nSirStatus = limStripOffExtCapIEAndUpdateStruct(pMac, addIE, &totalAddnIeLen, |
