From owner-freebsd-standards Tue Jan 29 13: 8:36 2002 Delivered-To: freebsd-standards@freebsd.org Received: from gw.nectar.cc (gw.nectar.cc [208.42.49.153]) by hub.freebsd.org (Postfix) with ESMTP id E3D5C37B404 for ; Tue, 29 Jan 2002 13:08:32 -0800 (PST) Received: from madman.nectar.cc (madman.nectar.cc [10.0.1.111]) by gw.nectar.cc (Postfix) with ESMTP id 4525940; Tue, 29 Jan 2002 15:08:32 -0600 (CST) Received: (from nectar@localhost) by madman.nectar.cc (8.11.6/8.11.6) id g0TL8UI50547; Tue, 29 Jan 2002 15:08:30 -0600 (CST) (envelope-from nectar) Date: Tue, 29 Jan 2002 15:08:29 -0600 From: "Jacques A. Vidrine" To: chuck rouillard Cc: FreeBSD-Standards Subject: Re: pathchk Message-ID: <20020129210829.GC50337@madman.nectar.cc> Mail-Followup-To: "Jacques A. Vidrine" , chuck rouillard , FreeBSD-Standards References: <20020129215901.A3335@descent.robbins.dropbear.id.au> <20020129114708.A92418-101000@opus.sandiegoca.ncr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020129114708.A92418-101000@opus.sandiegoca.ncr.com> User-Agent: Mutt/1.3.27i X-Url: http://www.nectar.cc/ Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, Jan 29, 2002 at 11:55:46AM -0800, chuck rouillard wrote: > My implementation of pathchk for review. Note that > it handles the illegal filesystem access of /proc, > the case where `/'^n is specified, and others. A quick look at the code turns up: = sizeof(char) is defined to be 1. = use of calloc appears to be redundant. = some operations are out of order: memory allocations or made or memory is written even after it is demonstrable that the path name or component is too long. also, in a `||' construction, do the least expensive operation first. = the arguments are modified. while not strictly an error, it is not nice. = it would be nicer if errno were explicitly passed to pe() Otherwise it's looking good! Cheers, -- Jacques A. Vidrine http://www.nectar.cc/ NTT/Verio SME . FreeBSD UNIX . Heimdal Kerberos jvidrine@verio.net . nectar@FreeBSD.org . nectar@kth.se To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message