This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH: safe string copy and concetation


On Tue, Aug 08, 2000 at 09:43:59AM -0700, Ulrich Drepper wrote:
> Christoph Hellwig <hch@caldera.de> writes:
> 
> > this patch implements the string functions strlcat and
> > strlcpy for gnu libc.
> 
> This is horribly inefficient BSD crap.  Using these function only
> leads to other errors.  Correct string handling means that you always
> know how long your strings are and therefore you can you memcpy
> (instead of strcpy).

memcpy for strings is plain ugly. memcpy will not null-terminate
your strings and led to source-bloat. 

There are some people outhere that like clean and safe solutions
better than fast ones ...


> Beside, those who are using strcat or variants deserved to be punished.

What's the problem with strlcat.
strcat is insecure and strncat inconsecuent, but strlcat?
Have you actually read the patch ...

	Christoph

-- 
Always remember that you are unique.  Just like everyone else.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]