mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 05:29:04 -04:00
qcacld-3.0: Trim operation classes to max supported in change station
Operation classes supported can be controlled by user, which can be sent greater than the max supported operations. This results in stack overflow in change station command. Add check to validate operations supported param given by user and if it exceeds max supported value, set it to max supported value. CRs-Fixed: 2002052 Change-Id: Idd3a35e38b091546a17d7ec6329f19429e5c289c
This commit is contained in:
parent
094ce6b202
commit
4f9ba364ed
1 changed files with 7 additions and 0 deletions
|
|
@ -334,6 +334,13 @@ wlan_cfg80211_tdls_extract_params(struct tdls_update_peer_params *req_info,
|
|||
if (params->supported_channels_len)
|
||||
tdls_calc_channels_from_staparams(req_info, params);
|
||||
|
||||
if (params->supported_oper_classes_len > WLAN_MAX_SUPP_OPER_CLASSES) {
|
||||
cfg80211_debug("received oper classes:%d, resetting it to max supported: %d",
|
||||
params->supported_oper_classes_len,
|
||||
WLAN_MAX_SUPP_OPER_CLASSES);
|
||||
params->supported_oper_classes_len = WLAN_MAX_SUPP_OPER_CLASSES;
|
||||
}
|
||||
|
||||
qdf_mem_copy(req_info->supported_oper_classes,
|
||||
params->supported_oper_classes,
|
||||
params->supported_oper_classes_len);
|
||||
|
|
|
|||
Loading…
Reference in a new issue