Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Jan 1997 21:49:37 +0100
From:      j@uriah.heep.sax.de (J Wunsch)
To:        hackers@freebsd.org
Subject:   Re: number of lines in a file, given its size
Message-ID:  <Mutt.19970112214937.j@uriah.heep.sax.de>
In-Reply-To: <199701121952.MAA26127@phaeton.artisoft.com>; from Terry Lambert on Jan 12, 1997 12:52:08 -0700
References:  <Mutt.19970112195725.j@uriah.heep.sax.de> <199701121952.MAA26127@phaeton.artisoft.com>

next in thread | previous in thread | raw e-mail | index | archive | help
As Terry Lambert wrote:

> > But you've got your point wrong.  strdup(), as much you prefer it or
> > not, was _by no means_ the answer to the question.  The question was

> You were the one concerned with the fixed buffer size (apparently as
> a means of an unlikely stack overflow attack).

Yes.  But Terry, you totally missed the point here, i'm telling you
for the third time now.  I stop telling you this.  Go, and read the
code!

You can't allocate an array of pointers with strdup().  Period.

> You were also the one concerned about "readability" for a well defined
> return value from strcpy(), which everyone reading the code *should*
> now is the copy target address.

This was in su(1), not in getusershell(3).

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Mutt.19970112214937.j>