[quagga-dev 3085] strlcpy implementation correct?
Andrew J. Schorr
aschorr at telemetry-investments.com
Sat Apr 2 16:53:45 BST 2005
In lib/str.c, we have:
* strlcpy is a safer version of strncpy(), checking the total
* size of the buffer
strlcpy(char *dst, const char *src, size_t size)
strncpy(dst, src, size);
Is that actually correct? I thought strlcpy was supposed to guarantee
termination with '\0' (unlike strncpy)?
It looks like strlcat may also be incorrect...
More information about the Quagga-dev