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

Commit fde22d16 authored by Alexei Avshalom Lazar's avatar Alexei Avshalom Lazar Committed by Lior David
Browse files

wil6210: check null pointer in _wil_cfg80211_merge_extra_ies



spos might be null and be accessed inside _wil_cfg80211_merge_extra_ies.
Add explicit check for null in the while condition statement and make
sure spos is not accessed in such a case.

Change-Id: I54143674ab7e2abbfa5704c2a315d790d8fff6b7
Signed-off-by: default avatarAlexei Avshalom Lazar <ailizaro@codeaurora.org>
Signed-off-by: default avatarLior David <liord@codeaurora.org>
parent 5220f834
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1860,7 +1860,7 @@ static int _wil_cfg80211_merge_extra_ies(const u8 *ies1, u16 ies1_len,
		memcpy(buf, ies1, ies1_len);
	dpos = buf + ies1_len;
	spos = ies2;
	while (spos + 1 < ies2 + ies2_len) {
	while (spos && (spos + 1 < ies2 + ies2_len)) {
		/* IE tag at offset 0, length at offset 1 */
		u16 ielen = 2 + spos[1];