aboutsummaryrefslogtreecommitdiffstats
path: root/src/wps/wps_defs.h
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-04-19 14:17:37 (GMT)
committerJouni Malinen <j@w1.fi>2015-04-22 19:05:12 (GMT)
commit6b94f71dcd16d88845759dad90c13d41675da6e9 (patch)
tree116ab5dcaebebdacd6c4eb995ce3e0d9088e268e /src/wps/wps_defs.h
parentf4b64c603e1f3764c4ffa42b3b7c74c8fa284542 (diff)
downloadhostap-6b94f71dcd16d88845759dad90c13d41675da6e9.zip
hostap-6b94f71dcd16d88845759dad90c13d41675da6e9.tar.gz
hostap-6b94f71dcd16d88845759dad90c13d41675da6e9.tar.bz2
WPS: Truncate variable length string attributes to maximum length
This enforces variable length strings Manufacturer, Model Name, Model Number, and Serial Number to be within the maximum length defined in the WSC specification. While none of the existing users for these within hostapd/wpa_supplicant had problems with longer strings, it is good to ensure the strings are not longer to avoid potential issues at higher layer components. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/wps/wps_defs.h')
-rw-r--r--src/wps/wps_defs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wps/wps_defs.h b/src/wps/wps_defs.h
index 5a09063..4334155 100644
--- a/src/wps/wps_defs.h
+++ b/src/wps/wps_defs.h
@@ -42,6 +42,10 @@ extern int wps_corrupt_pkhash;
#define WPS_OOB_DEVICE_PASSWORD_LEN 32
#define WPS_OOB_PUBKEY_HASH_LEN 20
#define WPS_DEV_NAME_MAX_LEN 32
+#define WPS_MANUFACTURER_MAX_LEN 64
+#define WPS_MODEL_NAME_MAX_LEN 32
+#define WPS_MODEL_NUMBER_MAX_LEN 32
+#define WPS_SERIAL_NUMBER_MAX_LEN 32
/* Attribute Types */
enum wps_attribute {