From 10d96e5c19594e0c77c2e21d368cbb77566772d3 Mon Sep 17 00:00:00 2001 From: Andrew Zaborowski Date: Tue, 14 Mar 2017 00:51:18 +0100 Subject: [PATCH] hwsim: Add terminating 0 byte to attribute Similar to 21a9b064d39e8d6c920a81c2d57eead2344157c8 also include the NUL byte in the name attribute when creating a radio through DBus call. --- tools/hwsim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/hwsim.c b/tools/hwsim.c index 22799fc9..5da820be 100644 --- a/tools/hwsim.c +++ b/tools/hwsim.c @@ -1381,7 +1381,7 @@ static struct l_dbus_message *radio_manager_create(struct l_dbus *dbus, if (name[0]) l_genl_msg_append_attr(new_msg, HWSIM_ATTR_RADIO_NAME, - strlen(name), name); + strlen(name) + 1, name); if (p2p) l_genl_msg_append_attr(new_msg, HWSIM_ATTR_SUPPORT_P2P_DEVICE,