From 86cc5019b5b6b0e08cb15095c2f48a5ef546adcf Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Sun, 31 Dec 2023 21:39:42 +0100 Subject: Replaced sprintf() calls --- FICS/playerdb.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'FICS') diff --git a/FICS/playerdb.c b/FICS/playerdb.c index ecb90c9..a4142de 100644 --- a/FICS/playerdb.c +++ b/FICS/playerdb.c @@ -1483,15 +1483,16 @@ player_pend_print(int p, pending *pend) char tmp[200] = { '\0' }; if (p == pend->whofrom) { - sprintf(outstr, "You are offering "); + (void)strlcpy(outstr, "You are offering ", sizeof outstr); } else { - sprintf(outstr, "%s is offering ", parray[pend->whofrom].name); + snprintf(outstr, sizeof outstr, "%s is offering ", + parray[pend->whofrom].name); } if (p == pend->whoto) { /* null */; } else { - sprintf(tmp, "%s ", parray[pend->whoto].name); + snprintf(tmp, sizeof tmp, "%s ", parray[pend->whoto].name); } if (strlcat(outstr, tmp, sizeof outstr) >= sizeof outstr) { -- cgit v1.2.3