[systemd-commits] src/libsystemd-bus

Tom Gundersen tomegun at kemper.freedesktop.org
Wed Oct 30 23:39:34 CET 2013


 src/libsystemd-bus/bus-util.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 07d978b0d4a8faa2290ac3ed00d7d25f2da17f3a
Author: Tom Gundersen <teg at jklm.no>
Date:   Wed Oct 30 23:21:46 2013 +0100

    bus-util: avoid infinite loop

diff --git a/src/libsystemd-bus/bus-util.c b/src/libsystemd-bus/bus-util.c
index 5a0e0cd..0632288 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;



More information about the systemd-commits mailing list