From: Todd Lewis Date: Mon, 29 Oct 2018 18:33:48 +0000 (+0000) Subject: Fix user and group name to number conversion for uid/gid above 2^31. X-Git-Tag: v4.0.0~386 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3c079c821ab749f23d69df2087541fe2d588333c;p=procps-ng Fix user and group name to number conversion for uid/gid above 2^31. --- diff --git a/pgrep.c b/pgrep.c index 0a2c4cc6..d2f2b654 100644 --- a/pgrep.c +++ b/pgrep.c @@ -296,7 +296,7 @@ static int conv_uid (const char *restrict name, struct el *restrict e) xwarnx(_("invalid user name: %s"), name); return 0; } - e->num = pwd->pw_uid; + e->num = (int) pwd->pw_uid; return 1; } @@ -313,7 +313,7 @@ static int conv_gid (const char *restrict name, struct el *restrict e) xwarnx(_("invalid group name: %s"), name); return 0; } - e->num = grp->gr_gid; + e->num = (int) grp->gr_gid; return 1; }