mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 16:16:15 -04:00
qcacld-3.0: Resolve invalid memory access while processing GET STATES IOCTL
qcacld-2.0 to qcacld-3.0 propagation While processing GET STATES IOCTL, in a while loop, HOST prints PE, LIM and MLM states of each session. Normally while loading, HOST allocates memory for five sessions, but while processing this IOCTL, it iterating in a loop assuming there are 255 sessions allocated, leading to crash because of invalid memory access. Hence while printing PE, LIM and MLM states iterate only for allocated number of sessions. Change-Id: I29c9a627615a1983d23831578f45aefe116dac25 CRs-Fixed: 879950
This commit is contained in:
parent
e306281cab
commit
589fd70615
1 changed files with 4 additions and 0 deletions
|
|
@ -9333,6 +9333,10 @@ uint32_t sme_get_lim_mlm_state(tHalHandle hHal)
|
|||
bool sme_is_lim_session_valid(tHalHandle hHal, uint8_t sessionId)
|
||||
{
|
||||
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
|
||||
|
||||
if (sessionId > pMac->lim.maxBssId)
|
||||
return false;
|
||||
|
||||
return pMac->lim.gpSession[sessionId].valid;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue