In other words, the correct way to use strncpy is
Code:
strncpy(dest, src, min(dest_size, src_size));
Which, by the way, makes MS's strcpy_s misdesigned. But we knew that.