From 409f8c1feffa75a0f06ca01c152398c2e25bba0f Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Sat, 25 May 2024 23:00:59 +0200 Subject: Fixed out of bounds array access --- FICS/command.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'FICS') diff --git a/FICS/command.c b/FICS/command.c index ee9b8d7..1161cfd 100644 --- a/FICS/command.c +++ b/FICS/command.c @@ -232,7 +232,8 @@ match_command(char *comm, int p) i++; } - if (in_list(p, L_REMOVEDCOM, command_list[gotIt].comm_name)) { + if (gotIt >= 0 && + in_list(p, L_REMOVEDCOM, command_list[gotIt].comm_name)) { pprintf(p, "Due to a bug - this command has been temporarily " "removed.\n"); return -COM_FAILED; -- cgit v1.2.3