From: Jim Meyering Date: Thu, 25 Dec 1997 17:05:23 +0000 (+0000) Subject: (get_ids): Don't cast GID_T_MAX to long, it might overflow. X-Git-Tag: FILEUTILS-3_16h~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f1ea6519b747f98f202fa4bbafda3fbb42701a4;p=thirdparty%2Fcoreutils.git (get_ids): Don't cast GID_T_MAX to long, it might overflow. --- diff --git a/src/install.c b/src/install.c index e0c4cc7ba5..4dc8716d5d 100644 --- a/src/install.c +++ b/src/install.c @@ -616,7 +616,7 @@ get_ids (void) { long int tmp_long; if (xstrtol (group_name, NULL, 0, &tmp_long, NULL) != LONGINT_OK - || tmp_long < 0 || tmp_long > (long) GID_T_MAX) + || tmp_long < 0 || tmp_long > GID_T_MAX) error (1, 0, _("invalid group `%s'"), group_name); group_id = (gid_t) tmp_long; }