aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/config_file.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2015-04-07 09:04:58 (GMT)
committerJouni Malinen <j@w1.fi>2015-04-22 08:44:18 (GMT)
commitcc6f24380cdd2f696affc43b38f4b549792d8933 (patch)
treeb3818f2c21a6f2466f43c995b541228582ad586e /hostapd/config_file.c
parentdd3d8578d08660c9bde0fccb0d3cbbd625c9e4f8 (diff)
downloadhostap-cc6f24380cdd2f696affc43b38f4b549792d8933.zip
hostap-cc6f24380cdd2f696affc43b38f4b549792d8933.tar.gz
hostap-cc6f24380cdd2f696affc43b38f4b549792d8933.tar.bz2
Add WPS_DEV_NAME_MAX_LEN define and use it when comparing length
This make code easier to understand. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'hostapd/config_file.c')
-rw-r--r--hostapd/config_file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index 82b08f9..f4cccf5 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -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;