Forráskód Böngészése

qcacld-3.0: Properly check return value of lim_cmp_ssid

lim_cmp_ssid() calls qdf_mem_cmp() and a return value of 0
means the memory to be compared are equal.

In lim_chk_ssid(), checking against != true is thus not
proper to ensure memory are equal. Thus check against
0 to ensure requested SSID matches our own SSID configured.

Change-Id: I31651e7fba47ae6eb22dc034c4479114343e8652
CRs-Fixed: 2765570
Jia Ding 4 éve
szülő
commit
aca93a9919
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      core/mac/src/pe/lim/lim_process_assoc_req_frame.c

+ 1 - 1
core/mac/src/pe/lim/lim_process_assoc_req_frame.c

@@ -332,7 +332,7 @@ static bool lim_chk_ssid(struct mac_context *mac_ctx, tpSirMacMgmtHdr hdr,
 			 struct pe_session *session, tpSirAssocReq assoc_req,
 			 uint8_t sub_type)
 {
-	if (lim_cmp_ssid(&assoc_req->ssId, session) != true)
+	if (!lim_cmp_ssid(&assoc_req->ssId, session))
 		return true;
 
 	pe_err("%s Req with ssid wrong(Rcvd: %.*s self: %.*s) from "