From 0d409ac1f0e1ffc92e4a5e4caf29f2987dedbfd1 Mon Sep 17 00:00:00 2001 From: Sourav Mohapatra Date: Tue, 4 Feb 2020 12:02:15 +0530 Subject: [PATCH] qcacld-3.0: Add proper NULL check in wma_link_status_event_handler Add proper NULL check for ht_info before accessing the structure. This field is sent as a part of the event from FW and could be NULL. Change-Id: I55dd7dcbe4ecdafe6a97ebcf2c7d9f08af30d8a2 CRs-Fixed: 2615175 --- core/wma/src/wma_utils.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/wma/src/wma_utils.c b/core/wma/src/wma_utils.c index 49fbf20a546c..49baa3e0a3e7 100644 --- a/core/wma/src/wma_utils.c +++ b/core/wma/src/wma_utils.c @@ -2828,6 +2828,11 @@ int wma_link_status_event_handler(void *handle, uint8_t *cmd_param_info, param_buf->fixed_param; ht_info = (wmi_vdev_rate_ht_info *) param_buf->ht_info; + if (!ht_info) { + wma_err("Invalid ht_info"); + return -EINVAL; + } + WMA_LOGD("num_vdev_stats: %d", event->num_vdev_stats); if (event->num_vdev_stats > ((WMI_SVC_MSG_MAX_SIZE -