ath10k: add sanity checks for service bmap parsing
This shouldn't really happen but take into account the original service bitmap length when mapping service ids. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
This commit is contained in:

committed by
Kalle Valo

parent
2a3e60d37f
commit
37b9f933e0
@@ -2516,10 +2516,12 @@ static void ath10k_wmi_event_service_ready(struct ath10k *ar,
|
||||
|
||||
if (test_bit(ATH10K_FW_FEATURE_WMI_10X, ar->fw_features)) {
|
||||
ret = ath10k_wmi_10x_pull_svc_rdy_ev(skb, &arg);
|
||||
wmi_10x_svc_map(arg.service_map, svc_bmap);
|
||||
wmi_10x_svc_map(arg.service_map, svc_bmap,
|
||||
arg.service_map_len);
|
||||
} else {
|
||||
ret = ath10k_wmi_main_pull_svc_rdy_ev(skb, &arg);
|
||||
wmi_main_svc_map(arg.service_map, svc_bmap);
|
||||
wmi_main_svc_map(arg.service_map, svc_bmap,
|
||||
arg.service_map_len);
|
||||
}
|
||||
|
||||
if (ret) {
|
||||
|
Reference in New Issue
Block a user