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: Alexei Avshalom Lazar <ailizaro@codeaurora.org> Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
c715b38473
commit
5c5d88a29d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user