From 089c33e336f29bb1e06ec9d0404014c0e9d3984d Mon Sep 17 00:00:00 2001 From: Srinivas Girigowda Date: Wed, 7 Dec 2016 14:32:24 -0800 Subject: [PATCH] qcacmn: Add boundary check for number of APs Add boundary check for number of APs. Change-Id: I41e36d11bc3e71928866a27afc2fbf046b59f0f5 CRs-Fixed: 1095770 --- wmi/src/wmi_unified_tlv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 1668838f9ebc..e1469008378d 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -11291,8 +11291,8 @@ QDF_STATUS send_get_buf_extscan_hotlist_cmd_tlv(wmi_unified_t wmi_handle, /* setbssid hotlist expects the bssid list * to be non zero value */ - if (!numap) { - WMI_LOGE("%s: Invalid number of bssid's", __func__); + if ((numap <= 0) || (numap > WMI_WLAN_EXTSCAN_MAX_HOTLIST_APS)) { + WMI_LOGE("Invalid number of APs: %d", numap); return QDF_STATUS_E_INVAL; }