diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2019-02-27 15:09:15 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-02-27 15:09:15 -0800 |
| commit | ad2299d6ffeaf9423ef1b33ef8622fe8e8acef4f (patch) | |
| tree | 53a29eeddcd1bc8de41ea560a9b6834d1f30e079 | |
| parent | 8fe5ad91d56a531b83d70ba1232df8623a88b30c (diff) | |
| parent | d7947e86c69f7b7ed2e74176a392b6c718d01d78 (diff) | |
Merge "qcacld-2.0: Compare the length of command in hdd_driver_command"
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_main.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c index f42bd901e5e4..91b2ffdc50cf 100644 --- a/CORE/HDD/src/wlan_hdd_main.c +++ b/CORE/HDD/src/wlan_hdd_main.c @@ -8497,22 +8497,28 @@ mem_free: } else if (strncmp(command, "STOP", 4) == 0) { hddLog(LOG1, FL("STOP command")); pHddCtx->driver_being_stopped = true; - } else if (strncmp(command, "BTCOEXSCAN", 10) == 0) { + } else if ((strncmp(command, "BTCOEXSCAN", 10) == 0) && + (((tANI_U8 *)strchrnul(command, ' ') - command) == 10)) { hddLog(LOG1, FL("ignore BTCOEXSCAN and return -ENOTSUPP")); ret = -ENOTSUPP; - } else if (strncmp(command, "RXFILTER", 8) == 0) { + } else if ((strncmp(command, "RXFILTER", 8) == 0) && + (((tANI_U8 *)strchrnul(command, ' ') - command) == 8)) { hddLog(LOG1, FL("ignore RXFILTER and return -ENOTSUPP")); ret = -ENOTSUPP; - } else if (strncmp(command, "RXFILTER-START", 14) == 0) { + } else if ((strncmp(command, "RXFILTER-START", 14) == 0) && + (((tANI_U8 *)strchrnul(command, ' ') - command) == 14)) { hddLog(LOG1, FL("ignore RXFILTER-START and return 0")); ret = 0; - } else if (strncmp(command, "RXFILTER-STOP", 13) == 0) { + } else if ((strncmp(command, "RXFILTER-STOP", 13) == 0) && + (((tANI_U8 *)strchrnul(command, ' ') - command) == 13)) { hddLog(LOG1, FL("ignore RXFILTER-STOP and return 0")); ret = 0; - } else if (strncmp(command, "BTCOEXSCAN-START", 16) == 0) { + } else if ((strncmp(command, "BTCOEXSCAN-START", 16) == 0) && + (((tANI_U8 *)strchrnul(command, ' ') - command) == 16)) { hddLog(LOG1, FL("ignore BTCOEXSCAN-START and return 0")); ret = 0; - } else if (strncmp(command, "BTCOEXSCAN-STOP", 15) == 0) { + } else if ((strncmp(command, "BTCOEXSCAN-STOP", 15) == 0) && + (((tANI_U8 *)strchrnul(command, ' ') - command) == 15)) { hddLog(LOG1, FL("ignore BTCOEXSCAN-STOP and return 0")); ret = 0; } else { |
