aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/playerdb.c
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-08-04 00:36:45 +0200
committerMarkus Uhlin <markus@nifty-networks.net>2024-08-04 00:36:45 +0200
commite8f2f8600ea194ded76e17a6875e1b1848e834cc (patch)
treed89139a7ea5b97c5841acd611da8c131ba6cb033 /FICS/playerdb.c
parent4019edcc5e23b9be9ba0a6dd33d1c841cbc38ca3 (diff)
SaveThisMsg: return 0 on sscanf() error
Diffstat (limited to 'FICS/playerdb.c')
-rw-r--r--FICS/playerdb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/FICS/playerdb.c b/FICS/playerdb.c
index 83bd16a..b301b99 100644
--- a/FICS/playerdb.c
+++ b/FICS/playerdb.c
@@ -2436,8 +2436,10 @@ SaveThisMsg(int which, char *line)
if (which == 0)
return 1;
- if (sscanf(line, "%19s", Sender) != 1)
+ if (sscanf(line, "%19s", Sender) != 1) {
warnx("%s: failed to read sender");
+ return 0;
+ }
if (which < 0) {
p1 = (-which) - 1;