Don't use strncpy()

strncpy() fills dest with NULL when src is shorter than n and
doesn't terminate dest if src is longer than n.