Date: Tue, 29 Jan 2002 15:08:29 -0600 From: "Jacques A. Vidrine" <n@nectar.cc> To: chuck rouillard <chuckr@opus.sandiegoca.ncr.com> Cc: FreeBSD-Standards <freebsd-standards@freebsd.org> Subject: Re: pathchk Message-ID: <20020129210829.GC50337@madman.nectar.cc> In-Reply-To: <20020129114708.A92418-101000@opus.sandiegoca.ncr.com> References: <20020129215901.A3335@descent.robbins.dropbear.id.au> <20020129114708.A92418-101000@opus.sandiegoca.ncr.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <n@nectar.cc> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020129210829.GC50337>