From owner-freebsd-standards Fri Dec 6 10:30: 4 2002 Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8773837B401 for ; Fri, 6 Dec 2002 10:30:02 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA7F943EBE for ; Fri, 6 Dec 2002 10:30:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id gB6IU1x3076742 for ; Fri, 6 Dec 2002 10:30:01 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id gB6IU19l076741; Fri, 6 Dec 2002 10:30:01 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B45C737B401 for ; Fri, 6 Dec 2002 10:23:24 -0800 (PST) Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1EC3443E4A for ; Fri, 6 Dec 2002 10:23:24 -0800 (PST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: from khavrinen.lcs.mit.edu (localhost [IPv6:::1]) by khavrinen.lcs.mit.edu (8.12.6/8.12.6) with ESMTP id gB6INNlI062747 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK) for ; Fri, 6 Dec 2002 13:23:23 -0500 (EST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.12.6/8.12.6/Submit) id gB6INMg5062746; Fri, 6 Dec 2002 13:23:22 -0500 (EST) (envelope-from wollman) Message-Id: <200212061823.gB6INMg5062746@khavrinen.lcs.mit.edu> Date: Fri, 6 Dec 2002 13:23:22 -0500 (EST) From: Garrett Wollman Reply-To: Garrett Wollman To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: standards/46035: pathchk doesn't understand the new meaning of {PATH_MAX} 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 >Number: 46035 >Category: standards >Synopsis: pathchk doesn't understand the new meaning of {PATH_MAX} >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Dec 06 10:30:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Garrett Wollman >Release: FreeBSD 5.0-CURRENT i386 >Organization: FreeBSD Project >Environment: System: FreeBSD khavrinen.lcs.mit.edu 5.0-CURRENT FreeBSD 5.0-CURRENT #609: Mon Nov 25 16:08:14 EST 2002 root@:/usr/src/sys/i386/compile/KHAVRINEN i386 $FreeBSD: src/usr.bin/pathchk/pathchk.c,v 1.2 2002/06/10 10:03:46 tjr Exp $ >Description: pathchk was never updated for the change in {PATH_MAX} semantics made by 1003.1-2001. {PATH_MAX} (and thus, {_POSIX_PATH_MAX}) now include the trailing null character. Thus, pathchk is off by one. >How-To-Repeat: wollman@khavrinen$ pathchk -p `perl -e 'print "/a" x 128'` wollman@khavrinen$ This should have given an error, because {_POSIX_PATH_MAX} is 256, and the path we constructed is (128 * 2 + 1 =) 257 bytes long. >Fix: Subtract 1 in the right places in pathchk.c. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message