strncpy() behaves differently across platforms when it comes to null termination of destination string. On BSDs, null termination of destination string must be done explicitly. Things are in correct order on standard elibc and glibc implementations. It causes incorrect format parsing on BSDs (_BSD_SOURCE). strlcpy() is also non-existent on platforms other than BSDs.
strncpy()
behaves differently across platforms when it comes to null termination of destination string. On BSDs, null termination of destination string must be done explicitly. Things are in correct order on standard elibc and glibc implementations. It causes incorrect format parsing on BSDs (_BSD_SOURCE
).strlcpy()
is also non-existent on platforms other than BSDs.