From 71b8ad3d0b13547886950b1bbef09c317667e3da Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 10 Feb 2011 13:53:13 +0000 Subject: [PATCH 2/2] DBusMessage: only cache messages that don't have too many bytes allocated Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34970 --- dbus/dbus-message.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c index 22e71a6..8f5d71f 100644 --- a/dbus/dbus-message.c +++ b/dbus/dbus-message.c @@ -637,8 +637,8 @@ dbus_message_cache_or_finalize (DBusMessage *message) _dbus_assert (message_cache_count >= 0); - if ((_dbus_string_get_length (&message->header.data) + - _dbus_string_get_length (&message->body)) > + if ((_dbus_string_get_allocated (&message->header.data) + + _dbus_string_get_allocated (&message->body)) > MAX_MESSAGE_SIZE_TO_CACHE) goto out; -- 1.7.4.1