summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2013-10-30 23:21:46 +0100
committerTom Gundersen <teg@jklm.no>2013-10-30 23:23:10 +0100
commit07d978b0d4a8faa2290ac3ed00d7d25f2da17f3a (patch)
tree24bb5ef98e9e531855d4d739216b427ef579acc3
parent4b4bec19582c3ad2b7d25116f3c22c783274fead (diff)
bus-util: avoid infinite loop
-rw-r--r--src/libsystemd-bus/bus-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd-bus/bus-util.c b/src/libsystemd-bus/bus-util.c
index 5a0e0cd503..0632288776 100644
--- a/src/libsystemd-bus/bus-util.c
+++ b/src/libsystemd-bus/bus-util.c
@@ -539,7 +539,7 @@ int bus_generic_print_property(const char *name, sd_bus_message *property, bool
printf("%s=", name);
- while(sd_bus_message_read_basic(property, SD_BUS_TYPE_STRING, &str)) {
+ while(sd_bus_message_read_basic(property, SD_BUS_TYPE_STRING, &str) > 0) {
printf("%s%s", space ? " " : "", str);
space = true;