You can use strncpy instead for a safer alternative

https://buildsecurityin.us-cert.gov/bsi/articles/knowledge/coding/316-BSI.html

If you want the compiler to warn you not to use strcpy, you...