> 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. \\ [EMAIL PROTECTED]
\\ -- Joseph Merrick \\ [EMAIL PROTECTED]
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message