https://randomascii.wordpress.com/2013/04/03/stop-using-strn...
But if you're using C++, use C++ strings, you don't need strcpy
There's strlcpy mentioned there, which seems a better C solution
https://randomascii.wordpress.com/2013/04/03/stop-using-strn...