Change vulnerable function 'strcpy' to 'strncpy' for better security