5e9bbf
commit c833a6241893c7e566a5eed762661942e4cd90d3
5e9bbf
Author: Todd Lewis <utoddl@gmail.com>
5e9bbf
Date:   Mon Oct 29 18:33:48 2018 +0000
5e9bbf
5e9bbf
    Fix user and group name to number conversion for uid/gid above 2^31.
5e9bbf
5e9bbf
diff --git a/pgrep.c b/pgrep.c
5e9bbf
index bde7448..8b82a54 100644
5e9bbf
--- a/pgrep.c
5e9bbf
+++ b/pgrep.c
5e9bbf
@@ -280,7 +280,7 @@ static int conv_uid (const char *restrict name, struct el *restrict e)
5e9bbf
 		xwarnx(_("invalid user name: %s"), name);
5e9bbf
 		return 0;
5e9bbf
 	}
5e9bbf
-	e->num = pwd->pw_uid;
5e9bbf
+	e->num = (int) pwd->pw_uid;
5e9bbf
 	return 1;
5e9bbf
 }
5e9bbf
 
5e9bbf
@@ -297,7 +297,7 @@ static int conv_gid (const char *restrict name, struct el *restrict e)
5e9bbf
 		xwarnx(_("invalid group name: %s"), name);
5e9bbf
 		return 0;
5e9bbf
 	}
5e9bbf
-	e->num = grp->gr_gid;
5e9bbf
+	e->num = (int) grp->gr_gid;
5e9bbf
 	return 1;
5e9bbf
 }
5e9bbf