diff options
| author | Ratheesh S P <c_rpappa@qti.qualcomm.com> | 2015-06-29 16:57:36 +0530 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2015-07-07 15:51:26 +0530 |
| commit | 3501fa6bb301d5db65bd997caf620c9803beb82f (patch) | |
| tree | 37df025869d08e90f9c500bcccaf2b52c22e02c8 | |
| parent | b49383803e67208b488e58827d6a8fcdb825d665 (diff) | |
qcacld-2.0: Validate TDLSOFFCHANNELMODE command
Validate arguments for TDLSOFFCHANNELMODE command
and return failure on invalid arguments.
Change-Id: I9ccb6e2a3106b6a1f2904bccd7964326d4fd621c
CRs-Fixed: 856466
| -rwxr-xr-x | CORE/HDD/src/wlan_hdd_main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c index c9b7069670fe..09bce0159ab8 100755 --- a/CORE/HDD/src/wlan_hdd_main.c +++ b/CORE/HDD/src/wlan_hdd_main.c @@ -5995,7 +5995,12 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter, int set_value; /* Move pointer to point the string */ value += 18; - sscanf(value, "%d", &set_value); + if (!(sscanf(value, "%d", &set_value))) { + VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO, + FL("No input identified")); + ret = -EINVAL; + goto exit; + } VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO, FL("Tdls offchannel mode:%d"), set_value); |
