diff options
| author | Tushnim Bhattacharyya <tushnimb@codeaurora.org> | 2018-04-30 17:25:38 -0700 |
|---|---|---|
| committer | nshrivas <nshrivas@codeaurora.org> | 2018-05-04 15:54:53 -0700 |
| commit | d89feb3feaa5c807a22c935975918bd52856fdca (patch) | |
| tree | 36be5a15b028c9ae1afa425e821988e9de1a4948 | |
| parent | fca33325f3ca34c536645e05df344363d40b5c88 (diff) | |
qcacld-3.0: Add range check for mode param in cds_get_pcl
Add range check for mode parameter in cds_get_pcl.
Change-Id: I049bebc5ec62f925e164517d59f94d122dbc5dc2
CRs-Fixed: 2229615
| -rw-r--r-- | core/cds/src/cds_concurrency.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c index 738815e0738a..8fa5fd5be4cc 100644 --- a/core/cds/src/cds_concurrency.c +++ b/core/cds/src/cds_concurrency.c @@ -5622,6 +5622,11 @@ QDF_STATUS cds_get_pcl(enum cds_con_mode mode, return status; } + if (mode >= CDS_MAX_NUM_OF_MODE) { + cds_err("requested mode:%d is not supported", mode); + return status; + } + /* find the current connection state from conc_connection_list*/ num_connections = cds_get_connection_count(); |
