Parcourir la source

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
Sourav Mohapatra il y a 5 ans
Parent
commit
0d409ac1f0
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 5 0
      core/wma/src/wma_utils.c

+ 5 - 0
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 -