summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2015-05-06 08:25:20 +0200
committerRalf Habacker <ralf.habacker@freenet.de>2015-05-06 12:10:18 +0200
commitcc4c2d72bcc599f8994d19b7ad409b596474ea2b (patch)
tree110c9710502bbf3f452fc1b6003b1d3bc936b0f8
parentd9d130d5fa9a57a3c900f33a36c54ab576eb8972 (diff)
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 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
-rw-r--r--dbus/dbus-message.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c
index 3e74fc54..1f433712 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))