[systemd-commits] src/libsystemd-bus
Lennart Poettering
lennart at kemper.freedesktop.org
Fri Oct 18 05:07:55 PDT 2013
src/libsystemd-bus/bus-message.c | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 1daf8121524246932b18be8dd7d63e792dee5de2
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Oct 18 14:06:56 2013 +0200
bus: if we hit the end of an array container return 0 as EOF indicator when reading it
diff --git a/src/libsystemd-bus/bus-message.c b/src/libsystemd-bus/bus-message.c
index bb339f5..511bdf5 100644
--- a/src/libsystemd-bus/bus-message.c
+++ b/src/libsystemd-bus/bus-message.c
@@ -2659,6 +2659,9 @@ int sd_bus_message_read_basic(sd_bus_message *m, char type, void *p) {
if (!c->signature || c->signature[c->index] == 0)
return 0;
+ if (message_end_of_array(m, m->rindex))
+ return 0;
+
if (c->signature[c->index] != type)
return -ENXIO;
@@ -3007,6 +3010,9 @@ int sd_bus_message_enter_container(sd_bus_message *m, char type, const char *con
if (!c->signature || c->signature[c->index] == 0)
return 0;
+ if (message_end_of_array(m, m->rindex))
+ return 0;
+
signature = strdup(contents);
if (!signature)
return -ENOMEM;
More information about the systemd-commits
mailing list