提交 99089ab7 编写于 作者: K Kalle Valo

ath6kl: add an extra band check to ath6kl_wmi_beginscan_cmd()

Dan reported that smatch found a possible issue in ath6kl_wmi_beginscan_cmd()
where we might access sc->supp_rates beyond the end. It shouldn't happen as
ar->wiphy->bands always have just the first two bands set, but add an extra
check just to be sure.
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
上级 aa8705fc
......@@ -2029,6 +2029,9 @@ int ath6kl_wmi_beginscan_cmd(struct wmi *wmi, u8 if_idx,
if (!sband)
continue;
if (WARN_ON(band >= ATH6KL_NUM_BANDS))
break;
ratemask = rates[band];
supp_rates = sc->supp_rates[band].rates;
num_rates = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册