diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-05-01 14:54:34 +0200 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-05-01 14:54:34 +0200 |
commit | 4c0299811690afa341076b08cbb2a0394891aaed (patch) | |
tree | 5305ae38994f965ed929f909719a825dd6a74a1b /FICS/command.c | |
parent | 8690c8b0cf00eb67d47b01f46a94e22eb25e8252 (diff) |
process_login: replaced unsafe strcpy() using a better approach
Diffstat (limited to 'FICS/command.c')
-rw-r--r-- | FICS/command.c | 3 |
1 files changed, 2 insertions, 1 deletions
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))) { |