change strcpy to strncpy for secure code