diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-12-10 03:30:51 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-12-10 03:30:51 +0100 |
commit | 5f7e8903b275f14d0f41f0542871d09deccb1741 (patch) | |
tree | e8289ce7e5d1725252ebadd17c355cadfde8acf3 /src/libsystemd-bus | |
parent | 224a1ed4c152c394d42b8a6fd78159af400d5df3 (diff) |
bus: properly handle empty messages
Diffstat (limited to 'src/libsystemd-bus')
-rw-r--r-- | src/libsystemd-bus/bus-message.c | 2 |
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; |