aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/playerdb.c
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-12-04 01:36:40 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2024-12-04 01:36:40 +0100
commit1ead39e269aa3af62cd0f416bd6fb7c5b9b77378 (patch)
treed5e45c876cfbaa7ca7555b3e381644dcc4d52630 /FICS/playerdb.c
parent9759434e28db896a49f4be1e1f09c55ae4231a91 (diff)
player_remove: added player number check
Diffstat (limited to 'FICS/playerdb.c')
-rw-r--r--FICS/playerdb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/FICS/playerdb.c b/FICS/playerdb.c
index d6ef838..084a1e7 100644
--- a/FICS/playerdb.c
+++ b/FICS/playerdb.c
@@ -327,6 +327,11 @@ player_remove(int p)
{
int i;
+ if (!player_num_ok_chk(p)) {
+ warnx("%s: invalid player number %d", __func__, p);
+ return -1;
+ }
+
player_decline_offers(p, -1, -1);
player_withdraw_offers(p, -1, -1);