summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/bus-kernel.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2013-04-14 16:28:34 +0200
committerKay Sievers <kay@vrfy.org>2013-04-14 16:28:34 +0200
commit01f6c9d4685edbc38c8df9175286f0e312dc1938 (patch)
treeeaccdd02e11c7df3cd61b84a6f43b9c7eeef9f61 /src/libsystemd-bus/bus-kernel.c
parent77930f11207ef6ec1f9284a1179fdd78c3364cba (diff)
bus: zero data structure and catch up with error value change
Diffstat (limited to 'src/libsystemd-bus/bus-kernel.c')
-rw-r--r--src/libsystemd-bus/bus-kernel.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libsystemd-bus/bus-kernel.c b/src/libsystemd-bus/bus-kernel.c
index 6105a02070..b2d98c05d7 100644
--- a/src/libsystemd-bus/bus-kernel.c
+++ b/src/libsystemd-bus/bus-kernel.c
@@ -475,6 +475,7 @@ int bus_kernel_create(const char *name, char **s) {
l = strlen(name);
make = alloca(offsetof(struct kdbus_cmd_bus_make, name) + DECIMAL_STR_MAX(uid_t) + 1 + l + 1);
+ memset(make, 0, offsetof(struct kdbus_cmd_bus_make, name));
sprintf(make->name, "%lu-%s", (unsigned long) getuid(), name);
make->size = offsetof(struct kdbus_cmd_bus_make, name) + strlen(make->name) + 1;
make->flags = KDBUS_ACCESS_WORLD | KDBUS_POLICY_OPEN;