From 9ce821c9d873fea44f2dde52f803d2d0f8e7152e Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Tue, 5 May 2015 17:08:18 +0200 Subject: [PATCH 1/5] auth_set_unix_credentials: Fix calling _dbus_credentials_add_unix_uid without checking return value (CID 54722). Reported by Coverity: CID 54722: Unchecked return value (CHECKED_RETURN) Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90021 --- dbus/dbus-auth-script.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dbus/dbus-auth-script.c b/dbus/dbus-auth-script.c index 03be4e2..fdbe1fe 100644 --- a/dbus/dbus-auth-script.c +++ b/dbus/dbus-auth-script.c @@ -221,7 +221,10 @@ auth_set_unix_credentials(DBusAuth *auth, _dbus_assert_not_reached ("no memory"); if (uid != DBUS_UID_UNSET) - _dbus_credentials_add_unix_uid (credentials, uid); + { + if (!_dbus_credentials_add_unix_uid (credentials, uid)) + _dbus_assert_not_reached ("no memory"); + } if (pid != DBUS_PID_UNSET) _dbus_credentials_add_pid (credentials, pid); -- 1.8.4.5