diff options
| -rw-r--r-- | dbus/dbus-sysdeps-unix.c | 6 | ||||
| -rw-r--r-- | dbus/dbus-sysdeps-util-unix.c | 6 | 
2 files changed, 10 insertions, 2 deletions
| diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c index 3f963bca..24a3774f 100644 --- a/dbus/dbus-sysdeps-unix.c +++ b/dbus/dbus-sysdeps-unix.c @@ -1493,7 +1493,11 @@ fill_user_info (DBusUserInfo       *info,      /* retrieve maximum needed size for buf */      buflen = sysconf (_SC_GETPW_R_SIZE_MAX); -    if (buflen <= 0) +    /* sysconf actually returns a long, but everything else expects size_t, +     * so just recast here. +     * https://bugs.freedesktop.org/show_bug.cgi?id=17061 +     */ +    if ((long) buflen <= 0)        buflen = 1024;      result = -1; diff --git a/dbus/dbus-sysdeps-util-unix.c b/dbus/dbus-sysdeps-util-unix.c index 55eb9346..0343a90c 100644 --- a/dbus/dbus-sysdeps-util-unix.c +++ b/dbus/dbus-sysdeps-util-unix.c @@ -836,7 +836,11 @@ fill_group_info (DBusGroupInfo    *info,      /* retrieve maximum needed size for buf */      buflen = sysconf (_SC_GETGR_R_SIZE_MAX); -    if (buflen <= 0) +    /* sysconf actually returns a long, but everything else expects size_t, +     * so just recast here. +     * https://bugs.freedesktop.org/show_bug.cgi?id=17061 +     */ +    if ((long) buflen <= 0)        buflen = 1024;      result = -1; | 
