Browse Source

qcacld-3.0: Check for NULL before dereferencing ll_stats result buffer

Check for NULL before dereferencing ll_stats result buffer.

Change-Id: Ie33b372a0231b8fdbe363d9537723f7f991cc4ac
CRs-Fixed: 2153520
Srinivas Girigowda 7 years ago
parent
commit
91d726c140
1 changed files with 6 additions and 1 deletions
  1. 6 1
      core/hdd/src/wlan_hdd_debugfs_llstat.c

+ 6 - 1
core/hdd/src/wlan_hdd_debugfs_llstat.c

@@ -51,8 +51,13 @@ void hdd_debugfs_process_iface_stats(struct hdd_adapter *adapter,
 	uint8_t *buffer;
 
 	ENTER();
-	iface_stat = data;
 
+	if (!ll_stats.result) {
+		hdd_err("LL statistics buffer is NULL");
+		return;
+	}
+
+	iface_stat = data;
 	buffer = ll_stats.result;
 	buffer += ll_stats.len;
 	len = scnprintf(buffer, DEBUGFS_LLSTATS_BUF_SIZE - ll_stats.len,