Use strncpy instead of strcpy.