From 4c0299811690afa341076b08cbb2a0394891aaed Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Wed, 1 May 2024 14:54:34 +0200 Subject: process_login: replaced unsafe strcpy() using a better approach --- FICS/command.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'FICS/command.c') diff --git a/FICS/command.c b/FICS/command.c index 6a90ae6..dacd382 100644 --- a/FICS/command.c +++ b/FICS/command.c @@ -574,7 +574,8 @@ process_login(int p, char *loginname) problem = 0; if (player_read(p, loginname)) { - strcpy(parray[p].name, loginnameii); + rfree(parray[p].name); + parray[p].name = xstrdup(loginnameii); if (in_list(p, L_FILTER, dotQuad(parray[p].thisHost))) { -- cgit v1.2.3