"Sebastian Kreft" <[EMAIL PROTECTED]> writes:

> Besides the use of int instead of size_t, what is the problem of portability
> with my patch?

Nothing.  That was the problem I was referrring to.  For example, the
patch you proposed mishandles a string of length 2147483648 on hosts
with 32-bit int, because 'length' wraps around to -2147483648.

> And finally, why do you use mempcpy instead of strncpy?

A minor speed increase.  mempcpy need not check for '\0'.


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to