diff options
| author | Govind Singh <govinds@qti.qualcomm.com> | 2015-09-01 12:48:25 +0530 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2015-09-16 16:40:13 +0530 |
| commit | b05dc5ecffb8a512c64bf4716c2681d190df7420 (patch) | |
| tree | 7c6299d2d22b8e4899c7af178c0f39395ca6706f | |
| parent | 9cb58ad2d89e1200599a671f79627389694da554 (diff) | |
qcacld-2.0: Add NULL check for event_buff
wma_peer_state_change_event_handler is triggered when
peer state is authorized.Add NULL check for event_buff
to avoid null dereference.
CRs-Fixed: 899857
Change-Id: Iece702bc936123dc03d70d6f5047935fa7aea0eb
| -rw-r--r-- | CORE/SERVICES/WMA/wma.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index 145e5fdf8c5c..153d0517aa21 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -5492,6 +5492,11 @@ static int wma_peer_state_change_event_handler(void *handle, ol_txrx_vdev_handle vdev; tp_wma_handle wma_handle = (tp_wma_handle)handle; + if (!event_buff) { + WMA_LOGE("%s: event param null", __func__); + return -EINVAL; + } + param_buf = (WMI_PEER_STATE_EVENTID_param_tlvs *)event_buff; if (!param_buf) { WMA_LOGE("%s: Received NULL buf ptr from FW", __func__); |
