summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2011-06-09 18:35:43 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2011-06-10 18:10:17 +0100
commit90ac05171d018e5d2cc0c3a3195b59425a626f96 (patch)
tree0ada00fee0e5df41faf421e338c5af6ec4e1e6aa
parentc3223ba6c401ba81df1305851312a47c485e6cd7 (diff)
downloaddbus-90ac05171d018e5d2cc0c3a3195b59425a626f96.tar.gz
dbus_message_demarshal_bytes_needed: correct a wrong assertion
It's entirely possible for a message to indicate how many bytes we need, without actually being complete. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38120 Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
-rw-r--r--dbus/dbus-message.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c
index 24ef5ac7..a59ed9bf 100644
--- a/dbus/dbus-message.c
+++ b/dbus/dbus-message.c
@@ -4680,7 +4680,7 @@ dbus_message_demarshal_bytes_needed(const char *buf,
if (validity == DBUS_VALID)
{
- _dbus_assert(have_message);
+ _dbus_assert (have_message || (header_len + body_len) > len);
return header_len + body_len;
}
else