summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaidiReddy Yenuga <saidir@codeaurora.org>2017-03-28 17:23:55 +0530
committerSandeep Puligilla <spuligil@codeaurora.org>2017-04-04 06:16:22 -0700
commitfbef89f889e03c69e517ffd0322ebc1c56217d54 (patch)
treedfd1d321bbc1816cb63a21d48c9670b5d6142019
parentbd618824afed7a7bdae118a234fde1778d33ccb5 (diff)
qcacld-3.0: Validate NLA attr in hdd_extscan_passpoint_fill_network_list
NLA attribute QCA_WLAN_VENDOR_ATTR_PNO_PASSPOINT_LIST_PARAM_NETWORK_ARRAY used without validation. validate NLA attribute. CRs-Fixed: 2025685 Change-Id: I141d5e6b3872df70b18797a99c943fca1cc5d31e
-rw-r--r--core/hdd/src/wlan_hdd_ext_scan.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/hdd/src/wlan_hdd_ext_scan.c b/core/hdd/src/wlan_hdd_ext_scan.c
index 0b7bf975560f..3c5341a5a74c 100644
--- a/core/hdd/src/wlan_hdd_ext_scan.c
+++ b/core/hdd/src/wlan_hdd_ext_scan.c
@@ -3973,6 +3973,11 @@ static int hdd_extscan_passpoint_fill_network_list(
expected_networks = req_msg->num_networks;
index = 0;
+
+ if (!tb[QCA_WLAN_VENDOR_ATTR_PNO_PASSPOINT_LIST_PARAM_NETWORK_ARRAY]) {
+ hdd_err("attr network array failed");
+ return -EINVAL;
+ }
nla_for_each_nested(networks,
tb[QCA_WLAN_VENDOR_ATTR_PNO_PASSPOINT_LIST_PARAM_NETWORK_ARRAY],
rem1) {