diff options
| author | Dmitry Shmidt <dimitrysh@google.com> | 2015-04-24 17:14:06 +0000 |
|---|---|---|
| committer | Android Partner Code Review <android-gerrit-partner@google.com> | 2015-04-24 17:14:06 +0000 |
| commit | 5a0635b4a35f29fed9243d35486c6b3aead8eba3 (patch) | |
| tree | 13e1451ecc315c5ed5ff7fa557daf20d1c7d3ef6 /hostapd | |
| parent | 7916ac221059b8aa6385b255b025aa542bc2de4d (diff) | |
| parent | 9d9e60286e05ae45025b672636490bd12586138d (diff) | |
| download | android_external_wpa_supplicant_8-5a0635b4a35f29fed9243d35486c6b3aead8eba3.tar.gz android_external_wpa_supplicant_8-5a0635b4a35f29fed9243d35486c6b3aead8eba3.tar.bz2 android_external_wpa_supplicant_8-5a0635b4a35f29fed9243d35486c6b3aead8eba3.zip | |
Merge "Cumulative security patch from commit ca68a8b561c48393c8ba25055ce294caaa3ac008" into m-wireless-dev
Diffstat (limited to 'hostapd')
| -rw-r--r-- | hostapd/config_file.c | 8 | ||||
| -rw-r--r-- | hostapd/hostapd_cli.c | 5 |
2 files changed, 7 insertions, 6 deletions
diff --git a/hostapd/config_file.c b/hostapd/config_file.c index 82b08f92..11866445 100644 --- a/hostapd/config_file.c +++ b/hostapd/config_file.c @@ -1723,7 +1723,7 @@ static int hs20_parse_osu_ssid(struct hostapd_bss_config *bss, char *str; str = wpa_config_parse_string(pos, &slen); - if (str == NULL || slen < 1 || slen > HOSTAPD_MAX_SSID_LEN) { + if (str == NULL || slen < 1 || slen > SSID_MAX_LEN) { wpa_printf(MSG_ERROR, "Line %d: Invalid SSID '%s'", line, pos); os_free(str); return -1; @@ -1970,7 +1970,7 @@ static int hostapd_config_fill(struct hostapd_config *conf, line); } else if (os_strcmp(buf, "ssid") == 0) { bss->ssid.ssid_len = os_strlen(pos); - if (bss->ssid.ssid_len > HOSTAPD_MAX_SSID_LEN || + if (bss->ssid.ssid_len > SSID_MAX_LEN || bss->ssid.ssid_len < 1) { wpa_printf(MSG_ERROR, "Line %d: invalid SSID '%s'", line, pos); @@ -1981,7 +1981,7 @@ static int hostapd_config_fill(struct hostapd_config *conf, } else if (os_strcmp(buf, "ssid2") == 0) { size_t slen; char *str = wpa_config_parse_string(pos, &slen); - if (str == NULL || slen < 1 || slen > HOSTAPD_MAX_SSID_LEN) { + if (str == NULL || slen < 1 || slen > SSID_MAX_LEN) { wpa_printf(MSG_ERROR, "Line %d: invalid SSID '%s'", line, pos); os_free(str); @@ -2837,7 +2837,7 @@ static int hostapd_config_fill(struct hostapd_config *conf, os_free(bss->wps_pin_requests); bss->wps_pin_requests = os_strdup(pos); } else if (os_strcmp(buf, "device_name") == 0) { - if (os_strlen(pos) > 32) { + if (os_strlen(pos) > WPS_DEV_NAME_MAX_LEN) { wpa_printf(MSG_ERROR, "Line %d: Too long " "device_name", line); return 1; diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c index 3f00cbbf..719d021c 100644 --- a/hostapd/hostapd_cli.c +++ b/hostapd/hostapd_cli.c @@ -10,6 +10,7 @@ #include <dirent.h> #include "common/wpa_ctrl.h" +#include "common/ieee802_11_defs.h" #include "utils/common.h" #include "utils/eloop.h" #include "utils/edit.h" @@ -541,7 +542,7 @@ static int hostapd_cli_cmd_wps_config(struct wpa_ctrl *ctrl, int argc, char *argv[]) { char buf[256]; - char ssid_hex[2 * 32 + 1]; + char ssid_hex[2 * SSID_MAX_LEN + 1]; char key_hex[2 * 64 + 1]; int i; @@ -552,7 +553,7 @@ static int hostapd_cli_cmd_wps_config(struct wpa_ctrl *ctrl, int argc, } ssid_hex[0] = '\0'; - for (i = 0; i < 32; i++) { + for (i = 0; i < SSID_MAX_LEN; i++) { if (argv[0][i] == '\0') break; os_snprintf(&ssid_hex[i * 2], 3, "%02x", argv[0][i]); |
