aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/playerdb.c
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2023-12-31 21:39:42 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2023-12-31 21:39:42 +0100
commit86cc5019b5b6b0e08cb15095c2f48a5ef546adcf (patch)
tree77960654dc6c8b3ba55162b6e76d4bb7f12808b3 /FICS/playerdb.c
parentbdf8b5fd5a38041221ffec51e946074239945c22 (diff)
Replaced sprintf() calls
Diffstat (limited to 'FICS/playerdb.c')
-rw-r--r--FICS/playerdb.c7
1 files changed, 4 insertions, 3 deletions
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) {