1. strcpy do not check the length of buffer that would be filled. it can cause buffer overflow.
2. strncpy do not fill '/0' at the end of the target string. you should do it manual.
it's standard method is as follows:
strncpy(path, str, sizeof(path)-1);
path[sizeof(path)-1] = 0;
3. strlcpy
strlcpy(dest, src, sizeof(dest));
the third parameter of the function is the sizeof source string. you need not to fill the '/0' at the end of the string.
but it can be used only in linux.