From owner-svn-src-head@FreeBSD.ORG Fri Nov 16 02:36:39 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C7C04EE6 for ; Fri, 16 Nov 2012 02:36:39 +0000 (UTC) (envelope-from postmaster@mailpod.hostingplatform.com) Received: from atl4mhob14.myregisteredsite.com (atl4mhob14.myregisteredsite.com [209.17.115.52]) by mx1.freebsd.org (Postfix) with ESMTP id 61E9C8FC13 for ; Fri, 16 Nov 2012 02:36:39 +0000 (UTC) Received: from mailpod1.hostingplatform.com (mailpod1.networksolutionsemail.com [206.188.198.65]) by atl4mhob14.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAG2acoQ002145 for ; Thu, 15 Nov 2012 21:36:38 -0500 Received: (qmail 10924 invoked by uid 0); 16 Nov 2012 02:36:38 -0000 Received: (qmail 3549 invoked by uid 0); 15 Nov 2012 18:53:37 -0000 Received: from unknown (HELO atl4mhib24.myregisteredsite.com) (209) by 0 with SMTP; 15 Nov 2012 18:53:37 -0000 Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by atl4mhib24.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFIraav014268 for ; Thu, 15 Nov 2012 13:53:36 -0500 Received: from hub.freebsd.org (hub.FreeBSD.org [8.8.178.136]) by mx2.freebsd.org (Postfix) with ESMTP id 228EA3B6B12; Thu, 15 Nov 2012 18:53:27 +0000 (UTC) Received: from hub.FreeBSD.org (hub.FreeBSD.org [8.8.178.136]) by hub.freebsd.org (Postfix) with ESMTP id CDAED8D2; Thu, 15 Nov 2012 18:53:27 +0000 (UTC) (envelope-from owner-svn-src-all@freebsd.org) Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 73BD478C for ; Thu, 15 Nov 2012 18:53:19 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id D1FAC8FC17 for ; Thu, 15 Nov 2012 18:53:18 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id j13so1871093lah.13 for ; Thu, 15 Nov 2012 10:53:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=uH6ZBjAfLlSRKHMijgXCoP+JGS8/wq84wSoLBThPQ9w=; b=Y4stiXKVIhKywsBG7nv94ZFvRuVu+JFj1oq1Sa9gk6soxWGn/zPDTqk45wCjJPTGVc NLg9/Eun+KubMqHyY2izrMdfQFaV3aQv/0OZiXTKr7ie/96WbjPDF3OmiPzV03Urnqgx mpzNLPMsOM2p5dLzAP8j6aWPrwpWjuanNd+sE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=uH6ZBjAfLlSRKHMijgXCoP+JGS8/wq84wSoLBThPQ9w=; b=IiHLqETTmeZbIYfLovgJlzQdYcjSer4Clfm0KQD50Re+Cq8fjSnOaFJmVV6msLfnvu CeJ0tAOIiBWQXIvwL9WUidh1+sqD/IB3ivIxCSZg7LPZzGT4sZNgmW1CRxmDx/6FuUnm cxlDdsDJGiKdgzaiK8ZJcqL+i3NhEB/HQkwBRcfNtlyLW382dvDJfOuPoBZBEYiMvS2N HIhXkC2RUIgEa4uWicOlMYOqIN6JpFSFwDw5dgV9jR/gOPbYHYGkBGb+cMVsZps5ytoq TO+/+REYYHyI+xhxGtB1rSM0gdhVeTq2Fg+hdgnMZ+VafdXouvzqanDBERO0E2B1lQpq h9GQ== Received: by 10.112.54.40 with SMTP id g8mr1011225lbp.49.1353005597564; Thu, 15 Nov 2012 10:53:17 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.25.166 with HTTP; Thu, 15 Nov 2012 10:52:46 -0800 (PST) In-Reply-To: <20121116032851.I44199@besplex.bde.org> References: <201211151506.qAFF63v0003848@svn.freebsd.org> <20121115153030.GD73505@kib.kiev.ua> <20121116032851.I44199@besplex.bde.org> From: Eitan Adler Date: Thu, 15 Nov 2012 13:52:46 -0500 X-Google-Sender-Auth: moJfvAvd2Bz9pTOVQDopkjjDLAc Message-ID: Subject: Re: svn commit: r243076 - head/usr.sbin/chkgrp To: Bruce Evans X-Gm-Message-State: ALoCoQlvBDsnxDZStKK5rbqdmHm86mz1GmOxptvE6JSeRuPqrBH88ShfThYkdgo88MKJngLpCtGF X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: owner-svn-src-all@freebsd.org Sender: owner-svn-src-all@freebsd.org X-SpamScore: 0 X-MailHub-Apparently-To: mjm@michaelmeltzer.com X-MailHub-Forwarded: Yes Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 02:36:39 -0000 On 15 November 2012 11:52, Bruce Evans wrote: > strtoul("1garbage", NULL, 10) succeeds and returns value 1, but the input > is garbage. This case is covered earlier 160 /* check that the GID is numeric */ 161 if (strspn(f[2], "0123456789") != strlen(f[2])) { 162 warnx("%s: line %d: GID is not numeric", gfn, n); > As the man page says, the EINVAL feature is unportable. It is almost > useless, since to detect garbage after the number you have to pass an > endptr to strtoul(), and then the check for no conversion (that is, > for garbage at the beginning) is just as easy as the check for garbage > at the end. This patch doesn't care about EINVAL or ERANGE. It just cares strtoul returned an error. I even considered just ignoring the error case because the data is mostly sanity checked prior. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"