summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libsystemd-bus/bus-message.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsystemd-bus/bus-message.c b/src/libsystemd-bus/bus-message.c
index bb339f5a82..511bdf503e 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;