mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-14 12:08:08 +02:00
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>
This commit is contained in:
parent
5948bd13ed
commit
8b5788b2c2
1 changed files with 4 additions and 1 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue