mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
dbus: Restrict DeviceName size to 32 characters in setter
The maximum WPS Device Name length is 32 characters and that limit was already enforced for the control interface and configuration files. Signed-off-by: Purushottam Kushwaha <p.kushwaha@samsung.com>
This commit is contained in:
parent
7c70fe2c6e
commit
bcce934755
@ -945,7 +945,8 @@ dbus_bool_t wpas_dbus_setter_p2p_device_config(
|
||||
if (os_strcmp(entry.key, "DeviceName") == 0) {
|
||||
char *devname;
|
||||
|
||||
if (entry.type != DBUS_TYPE_STRING)
|
||||
if (entry.type != DBUS_TYPE_STRING ||
|
||||
os_strlen(entry.str_value) > WPS_DEV_NAME_MAX_LEN)
|
||||
goto error;
|
||||
|
||||
devname = os_strdup(entry.str_value);
|
||||
|
Loading…
Reference in New Issue
Block a user