nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] strncpy(3), die, die, die.

2016-10-24 15:17:00
P Vixie writes:


On October 24, 2016 6:37:16 PM GMT+02:00, Ken Hornstein 
<kenh(_at_)pobox(_dot_)com> wrot
e:

I dunno, I think we'd need to think carefully if a particular use of
strncpy() really warrants an abort vs a truncate.  I mean, just
crapping
out on a really long line that other MUAs handle just fine seems rather
unfriendly to me.  What do others think?

Copy or die, as the default behavior.

Silent truncation should require explicit coding.

Strlcpy is completely bogus.

What's silent about strlcpy? Just check the return value against the size
of the buffer.

-- 
Anthony J. Bentley

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>