diff options
-rwxr-xr-x | dbus/dbus-transport-kdbus.c | 4 | ||||
-rwxr-xr-x | dbus/kdbus-common.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/dbus/dbus-transport-kdbus.c b/dbus/dbus-transport-kdbus.c index e23ded2b..893a3eff 100755 --- a/dbus/dbus-transport-kdbus.c +++ b/dbus/dbus-transport-kdbus.c @@ -1923,7 +1923,7 @@ capture_org_freedesktop_DBus_GetConnectionCredentials (DBusTransportKdbus *trans dbus_bool_t res = _dbus_asv_add_byte_array (&array_iter, "LinuxSecurityLabel", info.sec_label, - strlen (info.sec_label)+1); + info.sec_label_len); dbus_free (info.sec_label); @@ -1981,7 +1981,7 @@ capture_org_freedesktop_DBus_GetConnectionSELinuxSecurityContext (DBusTransportK reply = reply_fixed_array (message, DBUS_TYPE_BYTE, info.sec_label, - strlen (info.sec_label)+1); + info.sec_label_len); dbus_free (info.sec_label); return reply; diff --git a/dbus/kdbus-common.c b/dbus/kdbus-common.c index 3b5f4205..78a0f028 100755 --- a/dbus/kdbus-common.c +++ b/dbus/kdbus-common.c @@ -987,7 +987,7 @@ decode_connection_info (struct kdbus_info *connection_info, case KDBUS_ITEM_SECLABEL: if (get_sec_label) { - pInfo->sec_label_len = item->size - KDBUS_ITEM_HEADER_SIZE - 1; + pInfo->sec_label_len = item->size - KDBUS_ITEM_HEADER_SIZE; if (0 != pInfo->sec_label_len) { pInfo->sec_label = dbus_malloc (pInfo->sec_label_len); |