chiark / gitweb /
bus: fix hello ioctl buffer size calculation
authorLennart Poettering <lennart@poettering.net>
Tue, 24 Dec 2013 14:38:30 +0000 (15:38 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 24 Dec 2013 14:38:30 +0000 (15:38 +0100)
src/libsystemd-bus/bus-kernel.c

index 7997c1f..05544e1 100644 (file)
@@ -332,7 +332,7 @@ int bus_kernel_take_fd(sd_bus *b) {
         sz = ALIGN8(offsetof(struct kdbus_cmd_hello, items));
 
         if (b->fake_creds_valid)
-                sz += ALIGN8(offsetof(struct kdbus_item, creds));
+                sz += ALIGN8(offsetof(struct kdbus_item, creds)) + sizeof(struct kdbus_creds);
 
         if (b->fake_label) {
                 l = strlen(b->fake_label);