Browse Source

qcacld-3.0: Sanitize extn_eids before dereference

Sanitize extn_eids before de-reference.

Change-Id: I08a13fe785ebbf66f7ec3394d7aa72f685438619
CRs-Fixed: 3667854
Lin Bai 1 year ago
parent
commit
ec1ac7d8cf
1 changed files with 2 additions and 1 deletions
  1. 2 1
      core/mac/src/pe/rrm/rrm_api.c

+ 2 - 1
core/mac/src/pe/rrm/rrm_api.c

@@ -1625,7 +1625,8 @@ rrm_fill_beacon_ies(struct mac_context *mac, uint8_t *pIes,
 		i = 0;
 		do {
 			if (((!eids) || (*pBcnIes == eids[i])) ||
-				((*pBcnIes == eid) && *(pBcnIes + 2) == extn_eids[i])) {
+			    ((*pBcnIes == eid) &&
+			     (extn_eids && *(pBcnIes + 2) == extn_eids[i]))) {
 				if (((*pNumIes) + len) < pIesMaxSize) {
 						qdf_mem_copy(pIes, pBcnIes, len);
 						pIes += len;