diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-03-16 19:41:16 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-03-16 19:41:16 +0100 |
commit | 8dc529bca252fea5bd2cad79036535536f31af21 (patch) | |
tree | f0662c7f55d0102c53dc5ed597b8465b27a86a10 | |
parent | 1d3824704d1bd58e40a87f2006c8bacf7b4e2634 (diff) |
Replaced strcpy() with strlcpy()
-rw-r--r-- | FICS/ficsmain.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/FICS/ficsmain.c b/FICS/ficsmain.c index bdbba7e..46cdb4d 100644 --- a/FICS/ficsmain.c +++ b/FICS/ficsmain.c @@ -44,6 +44,10 @@ #include "talkproc.h" #include "utils.h" +#if __linux__ +#include <bsd/string.h> +#endif + /* Arguments */ PUBLIC int port; PUBLIC int withConsole; @@ -148,7 +152,7 @@ main(int argc, char *argv[]) } startuptime = time(NULL); - strcpy(fics_hostname, SERVER_HOSTNAME); + strlcpy(fics_hostname, SERVER_HOSTNAME, sizeof fics_hostname); game_high = 0; player_high = 0; quota_time = 60; |