]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: fix segfault on "systemctl --set-property UNIT BlockIODeviceWeight=WEIGHT" 3160/head
authorTejun Heo <htejun@fb.com>
Wed, 4 May 2016 21:43:13 +0000 (17:43 -0400)
committerTejun Heo <tj@kernel.org>
Wed, 4 May 2016 21:43:13 +0000 (17:43 -0400)
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 <htejun@fb.com>
src/shared/bus-unit-util.c

index e36a7741a8c8d21021b763c1992634e6b42b9da3..ee388b82db6a48514fbced19cff02039677e2f06 100644 (file)
@@ -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")) {