From owner-svn-src-all@freebsd.org Sat Aug 1 08:35:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EA019B0DD8; Sat, 1 Aug 2015 08:35:21 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50CC9C16; Sat, 1 Aug 2015 08:35:21 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t718ZK67035945; Sat, 1 Aug 2015 08:35:20 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t718ZKiH035944; Sat, 1 Aug 2015 08:35:20 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201508010835.t718ZKiH035944@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 1 Aug 2015 08:35:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r286148 - head/usr.sbin/chkgrp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Aug 2015 08:35:21 -0000 Author: bapt Date: Sat Aug 1 08:35:20 2015 New Revision: 286148 URL: https://svnweb.freebsd.org/changeset/base/286148 Log: Use strtoumax instead of strtoul Modified: head/usr.sbin/chkgrp/chkgrp.c Modified: head/usr.sbin/chkgrp/chkgrp.c ============================================================================== --- head/usr.sbin/chkgrp/chkgrp.c Sat Aug 1 07:51:48 2015 (r286147) +++ head/usr.sbin/chkgrp/chkgrp.c Sat Aug 1 08:35:20 2015 (r286148) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -169,9 +170,9 @@ main(int argc, char *argv[]) /* check the range of the group id */ errno = 0; - gid = strtoul(f[2], NULL, 10); + gid = strtoumax(f[2], NULL, 10); if (errno != 0) { - warnx("%s: line %d: strtoul failed", gfn, n); + warnx("%s: line %d: strtoumax failed", gfn, n); } else if (gid > GID_MAX) { warnx("%s: line %d: group id is too large (%ju > %ju)", gfn, n, (uintmax_t)gid, (uintmax_t)GID_MAX);