From b372c97b3a3dadcc2c5ef8aba5a453b6af1e8010 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Tue, 11 Nov 2025 21:45:08 +0100 Subject: Array bounds checking (found by PVS-Studio) --- FICS/lists.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FICS/lists.c b/FICS/lists.c index 97ee525..e93dd5b 100644 --- a/FICS/lists.c +++ b/FICS/lists.c @@ -63,7 +63,7 @@ list_find(int p, enum ListWhich l) personal = ListArray[l].rights == P_PERSONAL; if (personal) { - if (p < 0) + if (p < 0 || p >= (int)ARRAY_SIZE(parray)) return NULL; starter = &parray[p].lists; } else { -- cgit v1.2.3