]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(get_ids): Don't cast GID_T_MAX to long, it might overflow.
authorJim Meyering <jim@meyering.net>
Thu, 25 Dec 1997 17:05:23 +0000 (17:05 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 25 Dec 1997 17:05:23 +0000 (17:05 +0000)
src/install.c

index e0c4cc7ba5c0f56ec2729514344a49cd56e0d24b..4dc8716d5d65b1b561db09f8cb221029f0329f8f 100644 (file)
@@ -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;
        }