DivestOS/Patches/Linux_CVEs/CVE-2016-2474/ANY/0.patch
2017-10-29 22:14:37 -04:00

26 lines
1.0 KiB
Diff

diff --git a/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_main.c b/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_main.c
index 06d1298..48488eda 100644
--- a/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_main.c
+++ b/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_main.c
@@ -5337,17 +5337,17 @@
/*no argument followed by spaces*/
if ('\0' == *inPtr) return -EINVAL;
- /*getting the first argument ie measurement token*/
+ /* Getting the first argument ie Number of IE fields */
v = sscanf(inPtr, "%31s ", buf);
if (1 != v) return -EINVAL;
v = kstrtos32(buf, 10, &tempInt);
if ( v < 0) return -EINVAL;
+ tempInt = VOS_MIN(tempInt, SIR_ESE_MAX_MEAS_IE_REQS);
pEseBcnReq->numBcnReqIe = tempInt;
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH,
- "Number of Bcn Req Ie fields(%d)", pEseBcnReq->numBcnReqIe);
+ hddLog(LOG1, "Number of Bcn Req Ie fields: %d", pEseBcnReq->numBcnReqIe);
for (j = 0; j < (pEseBcnReq->numBcnReqIe); j++)
{