mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
qcacld-3.0: Add a SSID length check
Add a SSID length validation check before copying the SSID field to scan request structure from connect profile. Change-Id: Ic6297a28f8852db2e5d22c5c7d5b8eab7b76dbfd CRs-Fixed: 2145706
This commit is contained in:
parent
658e849971
commit
c0f7744dc3
1 changed files with 6 additions and 0 deletions
|
|
@ -4167,6 +4167,12 @@ QDF_STATUS csr_scan_for_ssid(tpAniSirGlobal mac_ctx, uint32_t session_id,
|
|||
|
||||
/* Extend it for multiple SSID */
|
||||
if (profile->SSIDs.numOfSSIDs) {
|
||||
if (profile->SSIDs.SSIDList[0].SSID.length > MAX_SSID_LEN) {
|
||||
sme_debug("wrong ssid length = %d",
|
||||
profile->SSIDs.SSIDList[0].SSID.length);
|
||||
status = QDF_STATUS_E_INVAL;
|
||||
goto error;
|
||||
}
|
||||
req->scan_req.num_ssids = 1;
|
||||
qdf_mem_copy(&req->scan_req.ssid[0].ssid,
|
||||
&profile->SSIDs.SSIDList[0].SSID.ssId,
|
||||
|
|
|
|||
Loading…
Reference in a new issue