bus: properly handle empty messages

This commit is contained in:
Lennart Poettering
2013-12-10 03:30:51 +01:00
parent 224a1ed4c1
commit 5f7e8903b2
+1 -1
View File
@@ -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;