From owner-freebsd-audit Fri Mar 2 9:51: 9 2001 Delivered-To: freebsd-audit@freebsd.org Received: from gw.nectar.com (gw.nectar.com [208.42.49.153]) by hub.freebsd.org (Postfix) with ESMTP id D3CA337B71A for ; Fri, 2 Mar 2001 09:51:06 -0800 (PST) (envelope-from nectar@nectar.com) Received: from hamlet.nectar.com (hamlet.nectar.com [10.0.1.102]) by gw.nectar.com (Postfix) with ESMTP id 27CA418C97; Fri, 2 Mar 2001 11:51:06 -0600 (CST) Received: (from nectar@localhost) by hamlet.nectar.com (8.11.2/8.9.3) id f22Hp6U63057; Fri, 2 Mar 2001 11:51:06 -0600 (CST) (envelope-from nectar@spawn.nectar.com) Date: Fri, 2 Mar 2001 11:51:06 -0600 From: "Jacques A. Vidrine" To: Warner Losh Cc: audit@freebsd.org Subject: Re: PATH_MAX vs MAXPATHLEN Message-ID: <20010302115105.A63024@hamlet.nectar.com> References: <200103020206.f2226Md53114@harmony.village.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200103020206.f2226Md53114@harmony.village.org>; from imp@harmony.village.org on Thu, Mar 01, 2001 at 07:06:21PM -0700 X-Url: http://www.nectar.com/ Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Mar 01, 2001 at 07:06:21PM -0700, Warner Losh wrote: > > Here's a patch that changes MAXPATHLEN to PATH_MAX in src/bin. Plus > fixes disordering of one include file. I believe that these changes > are correct, but wanted another set of eyes on them. > > Comments? I think (strlen(path) > PATH_MAX) is now an off-by-one error, considering the thread of yesterday. It is definately so in some of the code you included (e.g. `char p_path[PATH_MAX]'). These are probably just the result of doing s/MAXPATHLEN + 1/PATH_MAX/ in definitions, but s/MAXPATHLEN/PATH_MAX/ in comparisons. Cheers, -- Jacques Vidrine / n@nectar.com / jvidrine@verio.net / nectar@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message