From bf1a9ef0f8f3fa0880daf4d55be3b5fde58c5faa 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_unified_tlv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wmi_unified_tlv.c b/wmi_unified_tlv.c index 1668838f9e..e146900837 100644 --- a/wmi_unified_tlv.c +++ b/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; }