Commit 5c5d88a2 authored by Alexei Avshalom Lazar's avatar Alexei Avshalom Lazar Committed by Kalle Valo
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.

Signed-off-by: default avatarAlexei Avshalom Lazar <ailizaro@codeaurora.org>
Signed-off-by: default avatarMaya Erez <merez@codeaurora.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent c715b384
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1148,7 +1148,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);