浏览代码

qcacld-3.0: Avoid NULL pointer access in function wma_send_bcn_buf_ll

In function wma_send_bcn_buf_ll, bcn info is filled from
wma handle by mapping the vdev id. For valid vdev id also wma_handle
could have NULL beacon info. So, check for NULL pointer before
accessing the bcn pointer.

Change-Id: I660c8231801eb28962edc364a139e7980febb71e
CRs-Fixed: 2336946
Bala Venkatesh 6 年之前
父节点
当前提交
d267bf8de4
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      core/wma/src/wma_mgmt.c

+ 1 - 1
core/wma/src/wma_mgmt.c

@@ -103,7 +103,7 @@ static void wma_send_bcn_buf_ll(tp_wma_handle wma,
 	uint8_t i;
 
 	bcn = wma->interfaces[vdev_id].beacon;
-	if (!bcn->buf) {
+	if (!bcn || !bcn->buf) {
 		WMA_LOGE("%s: Invalid beacon buffer", __func__);
 		return;
 	}