diff options
author | Ralf Habacker <ralf.habacker@freenet.de> | 2015-05-05 17:08:18 +0200 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2015-05-06 12:14:44 +0200 |
commit | 8b5788b2c2c03b890c8d462075fc215617a88bf6 (patch) | |
tree | f97b70695170739cf82bf113f8518b6e85a6541c | |
parent | 5948bd13ed785882fbd856a63cab5571d6c9bbed (diff) | |
download | dbus-8b5788b2c2c03b890c8d462075fc215617a88bf6.tar.gz |
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
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
-rw-r--r-- | dbus/dbus-auth-script.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/dbus/dbus-auth-script.c b/dbus/dbus-auth-script.c index 03be4e20..fdbe1fe4 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); |