From owner-freebsd-hackers Tue Dec 9 08:06:45 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id IAA12538 for hackers-outgoing; Tue, 9 Dec 1997 08:06:45 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from mother.sneaker.net.au (akm@mother.sneaker.net.au [203.30.3.2]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id IAA12513 for ; Tue, 9 Dec 1997 08:06:28 -0800 (PST) (envelope-from akm@mother.sneaker.net.au) Received: (from akm@localhost) by mother.sneaker.net.au (8.8.5/8.8.5) id DAA20863; Wed, 10 Dec 1997 03:16:04 +1100 (EST) From: Andrew Kenneth Milton Message-Id: <199712091616.DAA20863@mother.sneaker.net.au> Subject: Re: [RFC] path converting functions. To: jdp@polstra.com (John Polstra) Date: Wed, 10 Dec 1997 03:16:04 +1100 (EST) Cc: shigio@wafu.netgate.net, hackers@FreeBSD.ORG In-Reply-To: <199712091541.HAA00577@austin.polstra.com> from "John Polstra" at Dec 9, 97 07:41:18 am X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk +-----[ John Polstra ]------------------------------ | | In article <199712032230.WAA28837@wafu.netgate.net>, | Shigio Yamaguchi wrote: | | > | > abs2rel - make a relative path name from an absolute path name | > | > abs2rel(, , ); | > | > | > /usr/src /etc ../usr/src | | Since your functions write into the user-supplied buffer "result", | you should add an argument that specifies how big it is. And always return an error if they haven't allocated MAXPATHLEN :-) That'll teach 'em. -- ,-_|\ SneakerNet | Andrew Milton | GSM: +61(41)6 022 411 / \ P.O. Box 154 | akm@sneaker.net.au | Fax: +61(2) 9746 8233 \_,-._/ N Strathfield +--+----------------------+---+ Ph: +61(2) 9746 8233 v NSW 2137 | Low cost Internet Solutions |