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

Commit 5f44d3ca 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 ff02bf94
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1199,7 +1199,7 @@ static inline void wil_c(struct wil6210_priv *wil, u32 reg, u32 val)
 */
static inline bool wil_cid_valid(struct wil6210_priv *wil, int cid)
{
	return (cid >= 0 && cid < wil->max_assoc_sta);
	return (cid >= 0 && cid < wil->max_assoc_sta && cid < WIL6210_MAX_CID);
}

void wil_get_board_file(struct wil6210_priv *wil, char *buf, size_t len);