This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [open-source] Re: Wish for 2002 ...
- From: <mouring at etoh dot eviladmin dot org>
- To: Markus Friedl <markus at openbsd dot org>
- Cc: Linus Torvalds <torvalds at transmeta dot com>, Paul Eggert <eggert at twinsun dot com>, <leclerc at austin dot sns dot slb dot com>, <security-audit at ferret dot lmh dot ox dot ac dot uk>, <libc-alpha at sources dot redhat dot com>, <openssh at openbsd dot org>
- Date: Fri, 11 Jan 2002 13:14:43 -0600 (CST)
- Subject: Re: [open-source] Re: Wish for 2002 ...
On Fri, 11 Jan 2002, Linus Torvalds wrote:
>
> On Fri, 11 Jan 2002, Markus Friedl wrote:
>
> > On Thu, Jan 10, 2002 at 04:37:27PM -0800, Paul Eggert wrote:
> > > len = strlen(challenge) + strlen(PROMPT) + 1;
> > > p = xmalloc(len);
> > > p[0] = '\0';
> > > strlcat(p, challenge, len);
^^ This really should be strlcpy() and the p[0] line should be
deleted it makes really no sense to concat to an blank string.
No where else do we do this unless we are in a loop where we can not use
strlcpy() to create a base string (or that I see off hand).
p[0]='\0'
while (..) {
if (..)
strlcat(..)
}
- Ben