diff options
-rw-r--r-- | src/wps/wps_attr_parse.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wps/wps_attr_parse.c b/src/wps/wps_attr_parse.c index 40bc1ad2d..5031f2e87 100644 --- a/src/wps/wps_attr_parse.c +++ b/src/wps/wps_attr_parse.c @@ -462,6 +462,12 @@ static int wps_set_attr(struct wps_parse_attr *attr, u16 type, attr->serial_number_len = len; break; case ATTR_DEV_NAME: + if (len > WPS_DEV_NAME_MAX_LEN) { + wpa_printf(MSG_DEBUG, + "WPS: Ignore too long Device Name (len=%u)", + len); + break; + } attr->dev_name = pos; attr->dev_name_len = len; break; |