diff options
| author | Jouni Malinen <j@w1.fi> | 2015-07-18 19:28:38 +0300 |
|---|---|---|
| committer | Linux Build Service Account <lnxbuild@localhost> | 2015-10-06 03:19:52 -0600 |
| commit | 49f942a582fe1cb68a5095771e57e0d84748701d (patch) | |
| tree | 167e76016909e9466eeb070d78f38cb061bb19f5 | |
| parent | 17baa937821255dd6228ffaae71af50ac0769b56 (diff) | |
| download | android_external_wpa_supplicant_8-49f942a582fe1cb68a5095771e57e0d84748701d.tar.gz android_external_wpa_supplicant_8-49f942a582fe1cb68a5095771e57e0d84748701d.tar.bz2 android_external_wpa_supplicant_8-49f942a582fe1cb68a5095771e57e0d84748701d.zip | |
FST: Fix FST-MANAGER TEST_REQUEST parsing
The space separator between the command and the parameter was not
skipped properly and the first integer ended up being interpreted as 0
in all cases.
Change-Id: I0978933f72854336c6f98e92cd6f273f11a65b90
Signed-off-by: Jouni Malinen <j@w1.fi>
Git-commit: 9c68b6af971e82621734f495c1ba9af490a37d0e
Git-repo: git://w1.fi/srv/git/hostap.git
CRs-Fixed: 891455
| -rw-r--r-- | src/fst/fst_session.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/fst/fst_session.c b/src/fst/fst_session.c index 2f42b12d..94122fd9 100644 --- a/src/fst/fst_session.c +++ b/src/fst/fst_session.c @@ -1359,6 +1359,9 @@ int fst_test_req_send_fst_request(const char *params) u8 channel; char additional_param[FST_MAX_COMMAND_WORD_NAME_LENGTH]; + if (params[0] != ' ') + return -EINVAL; + params++; fsts_id = fst_read_next_int_param(params, &is_valid, &endp); if (!is_valid) return -EINVAL; @@ -1410,6 +1413,9 @@ int fst_test_req_send_fst_response(const char *params) char response[FST_MAX_COMMAND_WORD_NAME_LENGTH]; struct fst_session *_s; + if (params[0] != ' ') + return -EINVAL; + params++; fsts_id = fst_read_next_int_param(params, &is_valid, &endp); if (!is_valid) return -EINVAL; @@ -1476,6 +1482,9 @@ int fst_test_req_send_ack_request(const char *params) struct fst_session s; struct fst_group *g; + if (params[0] != ' ') + return -EINVAL; + params++; fsts_id = fst_read_next_int_param(params, &is_valid, &endp); if (!is_valid) return -EINVAL; @@ -1501,6 +1510,9 @@ int fst_test_req_send_ack_response(const char *params) struct fst_session s; struct fst_group *g; + if (params[0] != ' ') + return -EINVAL; + params++; fsts_id = fst_read_next_int_param(params, &is_valid, &endp); if (!is_valid) return -EINVAL; @@ -1526,6 +1538,9 @@ int fst_test_req_send_tear_down(const char *params) struct fst_session s; struct fst_group *g; + if (params[0] != ' ') + return -EINVAL; + params++; fsts_id = fst_read_next_int_param(params, &is_valid, &endp); if (!is_valid) return -EINVAL; @@ -1548,6 +1563,9 @@ u32 fst_test_req_get_fsts_id(const char *params) char *endp; struct fst_session *s; + if (params[0] != ' ') + return FST_FSTS_ID_NOT_FOUND; + params++; sid = fst_read_next_int_param(params, &is_valid, &endp); if (!is_valid) return FST_FSTS_ID_NOT_FOUND; @@ -1567,6 +1585,9 @@ int fst_test_req_get_local_mbies(const char *request, char *buf, size_t buflen) struct fst_group *g; struct fst_iface *iface; + if (request[0] != ' ') + return -EINVAL; + request++; if (fst_read_next_text_param(request, ifname, sizeof(ifname), &endp) || !*ifname) goto problem; |
