aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
Diffstat (limited to 'FICS')
-rw-r--r--FICS/matchproc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/FICS/matchproc.c b/FICS/matchproc.c
index adbe5df..88e2bd9 100644
--- a/FICS/matchproc.c
+++ b/FICS/matchproc.c
@@ -1206,6 +1206,11 @@ com_accept(int p, param_list param)
}
}
+ if (acceptNum < 0 || acceptNum >= ARRAY_SIZE(parray[0].p_from_list)) {
+ pprintf(p, "Accept number out-of-bounds!\n");
+ return COM_FAILED;
+ }
+
from = parray[p].p_from_list[acceptNum].whofrom;
switch (parray[p].p_from_list[acceptNum].type) {