strncpy()
strncpy()
Posted Nov 5, 2007 5:35 UTC (Mon) by Ross (guest, #4065)In reply to: Thanks for proving Bernstein right by jordanb
Parent article: Daniel Bernstein: ten years of qmail security
It fails to terminate the string in some cases, so you end up having to either make sure the buffer is always bigger than the string (in which case you could use strcpy), or manually terminate the buffer. It's such a simple function, but it is still a horrible design.
