From: Tejun Heo Date: Wed, 4 May 2016 21:43:13 +0000 (-0400) Subject: core: fix segfault on "systemctl --set-property UNIT BlockIODeviceWeight=WEIGHT" X-Git-Tag: v230~69^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3160%2Fhead;p=thirdparty%2Fsystemd.git core: fix segfault on "systemctl --set-property UNIT BlockIODeviceWeight=WEIGHT" bus_append_unit_property_assignment() was missing an argument for sd_bus_message_append() when processing BlockIODeviceWeight leading to segfault. Fix it. Signed-off-by: Tejun Heo --- diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c index e36a7741a8c..ee388b82db6 100644 --- a/src/shared/bus-unit-util.c +++ b/src/shared/bus-unit-util.c @@ -331,7 +331,7 @@ int bus_append_unit_property_assignment(sd_bus_message *m, const char *assignmen log_error("Failed to parse %s value %s.", field, weight); return -EINVAL; } - r = sd_bus_message_append(m, "v", "a(st)", path, u); + r = sd_bus_message_append(m, "v", "a(st)", 1, path, u); } } else if (streq(field, "Nice")) {