diff options
| author | Anurag Chouhan <achouhan@codeaurora.org> | 2016-09-03 16:17:02 +0530 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2016-09-10 19:06:03 -0700 |
| commit | 43e0c7541b296b98a0c7ca4a52c0d2e52250bbde (patch) | |
| tree | 1c703f4d63ce845abcc876f95ac009fa8f4d7c8f | |
| parent | 02dd2e71c5fefa3cece9253fee9f9dffb7a3ed5e (diff) | |
qcacld-3.0: Validate ENABLEEXTWOW command
qcacld-2.0 to qcacld-3.0 propagation.
Validate arguments for ENABLEEXTWOW command
and return failure on invalid arguments.
Change-Id: I73556989f79754bca1bf4226ad71c2358b3a7526
CRs-Fixed: 857123
(cherry picked from commit 15e232c5aab90e6ed53d3a9a7f8d631ae451402e)
| -rw-r--r-- | core/hdd/src/wlan_hdd_ioctl.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c index 33c59ede1d31..27a7f5f80fca 100644 --- a/core/hdd/src/wlan_hdd_ioctl.c +++ b/core/hdd/src/wlan_hdd_ioctl.c @@ -5736,7 +5736,11 @@ static int drv_cmd_enable_ext_wow(hdd_adapter_t *adapter, /* Move pointer to ahead of ENABLEEXTWOW */ value = value + command_len; - sscanf(value, "%d", &set_value); + if (!(sscanf(value, "%d", &set_value))) { + QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_INFO, + ("No input identified")); + return -EINVAL; + } return hdd_enable_ext_wow_parser(adapter, adapter->sessionId, |
