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
1 changed files with 2 additions and 1 deletions
|
@ -945,7 +945,8 @@ dbus_bool_t wpas_dbus_setter_p2p_device_config(
|
||||||
if (os_strcmp(entry.key, "DeviceName") == 0) {
|
if (os_strcmp(entry.key, "DeviceName") == 0) {
|
||||||
char *devname;
|
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;
|
goto error;
|
||||||
|
|
||||||
devname = os_strdup(entry.str_value);
|
devname = os_strdup(entry.str_value);
|
||||||
|
|
Loading…
Reference in a new issue