From a1df545ea2ceee803999ed225a19c8387752375e Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Tue, 5 May 2015 17:10:01 +0200 Subject: [PATCH 2/5] auth_set_unix_credentials: Fix calling _dbus_credentials_add_pid without checking return value (CID 54708). Reported by Coverity: CID 54708: Unchecked return value (CHECKED_RETURN) Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90021 --- dbus/dbus-auth-script.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dbus/dbus-auth-script.c b/dbus/dbus-auth-script.c index fdbe1fe..7387220 100644 --- a/dbus/dbus-auth-script.c +++ b/dbus/dbus-auth-script.c @@ -226,8 +226,10 @@ auth_set_unix_credentials(DBusAuth *auth, _dbus_assert_not_reached ("no memory"); } if (pid != DBUS_PID_UNSET) - _dbus_credentials_add_pid (credentials, pid); - + { + if (!_dbus_credentials_add_pid (credentials, pid)) + _dbus_assert_not_reached ("no memory"); + } _dbus_auth_set_credentials (auth, credentials); _dbus_credentials_unref (credentials); -- 1.8.4.5