aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/matchproc.c
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-03-29 22:54:26 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2024-03-29 22:54:26 +0100
commit5447af315517c13e724d39272eb741b8e973f091 (patch)
tree1db213f065b10523260f4f009fd35f7e60ca49bd /FICS/matchproc.c
parentd7817b22f9b56fb4eb1730a3c4e2705eee0b33a1 (diff)
Replaced a sprintf() call with snprintf()
Diffstat (limited to 'FICS/matchproc.c')
-rw-r--r--FICS/matchproc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/FICS/matchproc.c b/FICS/matchproc.c
index ede9084..db6e110 100644
--- a/FICS/matchproc.c
+++ b/FICS/matchproc.c
@@ -70,7 +70,7 @@ PUBLIC int
create_new_match(int white_player, int black_player, int wt, int winc, int bt,
int binc, int rated, char *category, char *board, int white)
{
- char outStr[1024];
+ char outStr[1024] = { '\0' };
int g, p;
int reverse = 0;
@@ -212,7 +212,8 @@ create_new_match(int white_player, int black_player, int wt, int winc, int bt,
garray[g].lastDecTime = garray[g].startTime;
garray[g].clockStopped = 0;
- sprintf(outStr, "\n{Game %d (%s vs. %s) Creating %s %s match.}\n",
+ snprintf(outStr, sizeof outStr, "\n{Game %d (%s vs. %s) "
+ "Creating %s %s match.}\n",
(g + 1),
parray[white_player].name,
parray[black_player].name,