[3.0] Change vulnerable function 'strcpy' to 'strncpy' for better security