summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/bus-kernel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd-bus/bus-kernel.c')
-rw-r--r--src/libsystemd-bus/bus-kernel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsystemd-bus/bus-kernel.c b/src/libsystemd-bus/bus-kernel.c
index 81469365f0..54a5e1691c 100644
--- a/src/libsystemd-bus/bus-kernel.c
+++ b/src/libsystemd-bus/bus-kernel.c
@@ -486,10 +486,11 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k, sd_bus_mess
part->data = UINT64_TO_PTR(d->vec.address);
part->size = d->vec.size;
} else {
- part->data = (uint8_t*) UINT64_TO_PTR(d->vec.address) + (begin_body - idx);
+ part->data = d->vec.address != 0 ? (uint8_t*) UINT64_TO_PTR(d->vec.address) + (begin_body - idx) : NULL;
part->size = d->vec.size - (begin_body - idx);
}
+ part->is_zero = d->vec.address == 0;
part->sealed = true;
}