Re: C / C++ compilers and libc could do this too
It doesn't guarantee strings are null-terminated, unless you yourself make the buffer one byte larger, set that byte to 0, and are sure it's never going to be used.
Use strlcpy or strcpy_s (C11) instead.