summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixelBot AutoMerger <android-nexus-securitybot@system.gserviceaccount.com>2023-12-31 18:30:04 -0800
committerSecurityBot <android-nexus-securitybot@system.gserviceaccount.com>2023-12-31 18:30:04 -0800
commit16e63a908f645c3e2b919ec4d329d6c72114411e (patch)
treecb221a4f047d84ef522bde3c0954543d52914d71
parenteaa35b297fd0d0b09ae370ea52f987b4e71165dd (diff)
parent99acad13c365ad2c31bf8d8045bf59ab3ce18e45 (diff)
downloadwlan-16e63a908f645c3e2b919ec4d329d6c72114411e.tar.gz
SBMerger: 571992243 Change-Id: I5d5f52f1cd72f2f966ade3391b53e59a8be580b7 Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
-rw-r--r--qcacld-3.0/core/hdd/src/wlan_hdd_cfg80211.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/qcacld-3.0/core/hdd/src/wlan_hdd_cfg80211.c b/qcacld-3.0/core/hdd/src/wlan_hdd_cfg80211.c
index 760a74b..5e7076c 100644
--- a/qcacld-3.0/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/qcacld-3.0/core/hdd/src/wlan_hdd_cfg80211.c
@@ -4919,12 +4919,13 @@ hdd_send_roam_scan_channel_freq_list_to_sme(struct hdd_context *hdd_ctx,
return QDF_STATUS_E_INVAL;
}
- nla_for_each_nested(curr_attr, tb2[PARAM_SCAN_FREQ_LIST], rem)
+ nla_for_each_nested(curr_attr, tb2[PARAM_SCAN_FREQ_LIST], rem) {
+ if (num_chan >= SIR_MAX_SUPPORTED_CHANNEL_LIST) {
+ hdd_err("number of channels (%d) supported exceeded max (%d)",
+ num_chan, SIR_MAX_SUPPORTED_CHANNEL_LIST);
+ return QDF_STATUS_E_INVAL;
+ }
num_chan++;
- if (num_chan > SIR_MAX_SUPPORTED_CHANNEL_LIST) {
- hdd_err("number of channels (%d) supported exceeded max (%d)",
- num_chan, SIR_MAX_SUPPORTED_CHANNEL_LIST);
- return QDF_STATUS_E_INVAL;
}
num_chan = 0;