From: Tom Gundersen Date: Wed, 30 Oct 2013 22:21:46 +0000 (+0100) Subject: bus-util: avoid infinite loop X-Git-Tag: v209~1701 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=07d978b0d4a8faa2290ac3ed00d7d25f2da17f3a bus-util: avoid infinite loop --- diff --git a/src/libsystemd-bus/bus-util.c b/src/libsystemd-bus/bus-util.c index 5a0e0cd50..063228877 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;