From 617b60b8dd19d45bfaf01165fbc3b2de75df050f Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Wed, 6 May 2015 08:25:20 +0200 Subject: [PATCH 3/5] dbus_message_demarshal: Fix calling _dbus_string_append_len without checking return value (CID 54690). Reported by Coverity: CID 54690: Unchecked return value (CHECKED_RETURN) Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90021 --- dbus/dbus-message.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c index 22da695..d6fec0b 100644 --- a/dbus/dbus-message.c +++ b/dbus/dbus-message.c @@ -4796,7 +4796,10 @@ dbus_message_demarshal (const char *str, return NULL; _dbus_message_loader_get_buffer (loader, &buffer); - _dbus_string_append_len (buffer, str, len); + + if (!_dbus_string_append_len (buffer, str, len)) + goto fail_oom; + _dbus_message_loader_return_buffer (loader, buffer); if (!_dbus_message_loader_queue_messages (loader)) -- 1.8.4.5