summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libsystemd-bus/bus-message.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd-bus/bus-message.c b/src/libsystemd-bus/bus-message.c
index 4488e7b6b3..9e712717cc 100644
--- a/src/libsystemd-bus/bus-message.c
+++ b/src/libsystemd-bus/bus-message.c
@@ -3061,7 +3061,7 @@ static int message_peek_body(
}
part = find_part(m, start, nbytes, (void**) &q);
- if (!part || !q)
+ if (!part || (nbytes > 0 && !q))
return -EBADMSG;
*rindex = end;