Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2db26b17 authored by Gururaj Pandurangi's avatar Gururaj Pandurangi Committed by Gerrit - the friendly Code Review server
Browse files

qcacld-3.0: Fix while condition in rrm_fill_beacon_ies()

In function rrm_fill_beacon_ies, do while loop is checked
for BcnNumIes if it is greater than IE length 0. Fix the
check to be greater than 2 as the first two bytes is IE
header(element ID and IE length fields both 1 byte each.)

Change-Id: I11e5de481cd49a22acafee938fbe73f839f5b0e4
CRs-Fixed: 2626729
parent 2bc32f25
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
 * any purpose with or without fee is hereby granted, provided that the
@@ -744,7 +744,7 @@ rrm_fill_beacon_ies(tpAniSirGlobal pMac,
		pIes += sizeof(uint16_t);
	}

	while (BcnNumIes > 0) {
	while (BcnNumIes >= 2) {
		len = *(pBcnIes + 1);
		len += 2;       /* element id + length. */
		pe_debug("EID = %d, len = %d total = %d",