Date: Thu, 15 Jul 1999 16:29:53 -0700 From: Mike Smith <mike@smith.net.au> To: Paul Hart <hart@iserver.com> Cc: Julian Elischer <julian@whistle.com>, freebsd-hackers@FreeBSD.ORG Subject: Re: OpenBSD's strlcpy(3) and strlcat(3) Message-ID: <199907152329.QAA01720@dingo.cdrom.com> In-Reply-To: Your message of "Thu, 15 Jul 1999 17:20:52 MDT." <Pine.BSF.3.96.990715171650.19105D-100000@anchovy.orem.iserver.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> On Thu, 15 Jul 1999, Julian Elischer wrote: > > > There was a talk on these (strlcpy(3) and strlcat(3)) at USENIX. > > The logic as to their design was presented and I agree totally with > > the way that the logic was played out into the functions. > > > > They are described in the FreeNIX proceedings on page 175. > > I feel they make a lot more sense that teh present version sand we should > > support OpenBSD's application to Posix to make them standard. > > Yes, this discussion started out on freebsd-security and when I first > wrote about it, I mentioned the paper at USENIX by Todd Miller and Theo de > Raadt. It was later mentioned that the paper and accompanying slides are > available at: > > http://www.openbsd.org/papers/strlcpy-paper.ps > http://www.openbsd.org/papers/strlcpy-slides.ps > > I think each function is well thought out and I think they'd be a great > addition to FreeBSD. Ugh. Take the first example in the paper; it rewrites as len = asprintf(&path, "%s/.foorc"); as opposed to strlcat(path, homedir, sizeof(path)); strlcat(path, "/", sizeof(path)); strlcat(path, ".foord", sizeof(path)); len = strlen(path); Yes, they're a better str*cat/cpy, but they're not the solution that they claim to be. -- \\ The mind's the standard \\ Mike Smith \\ of the man. \\ msmith@freebsd.org \\ -- Joseph Merrick \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907152329.QAA01720>