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

Commit 62b5e280 authored by Alexei Avshalom Lazar's avatar Alexei Avshalom Lazar
Browse files

wil6210: add verification for cid upper bound



max_assoc_sta can receive values (from the user or from the FW)
that are higher than WIL6210_MAX_CID.
Verify that cid doesn't exceed the upper bound of WIL6210_MAX_CID.

Change-Id: Id00b69a128d2c4df4a3ef85583bbe44590ff557c
Signed-off-by: default avatarAlexei Avshalom Lazar <ailizaro@codeaurora.org>
parent eac6c82e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -473,7 +473,7 @@ static inline void parse_cidxtid(u8 cidxtid, u8 *cid, u8 *tid)
 */
static inline bool wil_cid_valid(int cid)
{
	return (cid >= 0 && cid < max_assoc_sta);
	return (cid >= 0 && cid < max_assoc_sta && cid < WIL6210_MAX_CID);
}

struct wil6210_mbox_ring {