strncpy may leave the destination without a null terminator when the source fills the buffer.
Explicitly set the final byte to zero or use strlcpy.