diff options
author | Adrian Szyndela <adrian.s@samsung.com> | 2016-09-13 09:59:34 +0200 |
---|---|---|
committer | Adrian Szyndela <adrian.s@samsung.com> | 2016-09-13 10:00:42 +0200 |
commit | 287dce5548e31b2ff1f7a3234c2ff74fb86ab2fa (patch) | |
tree | 5d8da42f73f8ba17dc5214a436910f88c30048db | |
parent | 1baefdfc868b98e1dc513ed9e32a51e0ca56f5f1 (diff) | |
download | dbus-287dce5548e31b2ff1f7a3234c2ff74fb86ab2fa.tar.gz dbus-287dce5548e31b2ff1f7a3234c2ff74fb86ab2fa.tar.bz2 dbus-287dce5548e31b2ff1f7a3234c2ff74fb86ab2fa.zip |
bugfix: sec_label was copied without ending bytesubmit/tizen/20160919.053144accepted/tizen/wearable/20160920.051557accepted/tizen/tv/20160920.051534accepted/tizen/mobile/20160920.051520accepted/tizen/ivi/20160920.051616accepted/tizen/common/20160919.154452
Change-Id: I3d9aa7f2d608e6706600a87ad5dc570033244f98
-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); |