aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/lists.c
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2025-11-11 21:45:08 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2025-11-11 21:45:08 +0100
commitb372c97b3a3dadcc2c5ef8aba5a453b6af1e8010 (patch)
tree75d8a57c831a50af50de56dd5f00fbf3e969d197 /FICS/lists.c
parentc7f512e3e95f79425d7e826650df41d5069a9eb0 (diff)
Array bounds checking (found by PVS-Studio)
Diffstat (limited to 'FICS/lists.c')
-rw-r--r--FICS/lists.c2
1 files changed, 1 insertions, 1 deletions
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 {