mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-07 14:28:01 +02:00
dbus-sysdeps-unix: Check socklen_t is unsigned when getting group list
After the change to handle an empty list properly, the function now
assumes that is true.
(cherry picked from commit 49dd4aba42)
This commit is contained in:
parent
8a98ef62b0
commit
fa7eaefe7c
1 changed files with 2 additions and 0 deletions
|
|
@ -1932,6 +1932,8 @@ add_groups_to_credentials (int client_fd,
|
|||
{
|
||||
#if defined(__linux__) && defined(SO_PEERGROUPS)
|
||||
_DBUS_STATIC_ASSERT (sizeof (gid_t) <= sizeof (dbus_gid_t));
|
||||
/* This function assumes socklen_t is unsigned, which is true on Linux */
|
||||
_DBUS_STATIC_ASSERT (((socklen_t) -1) > 0);
|
||||
gid_t *buf = NULL;
|
||||
socklen_t len = 1024;
|
||||
dbus_bool_t oom = FALSE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue