commit eb5e0490e6a4a2ad1c8ea25469a7541175e5b3db from: Markus Uhlin date: Mon Dec 2 20:02:02 2024 UTC Accept number bounds checking commit - 47ee7e8870884e01a3b5bef63094d30cbae59d52 commit + eb5e0490e6a4a2ad1c8ea25469a7541175e5b3db blob - adbe5dff3f96b6cccf700fbcfe0f243b79918f37 blob + 88e2bd95963dfcc7e51811388edc7fa1ec62aad9 --- FICS/matchproc.c +++ 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) {