This is the mail archive of the
mailing list for the glibc project.
Re: PATCH: safe string copy and concetation
On Tue, Aug 08, 2000 at 09:43:59AM -0700, Ulrich Drepper wrote:
> Christoph Hellwig <email@example.com> 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 ...
Always remember that you are unique. Just like everyone else.