diff options
| author | Markus Uhlin <markus@nifty-networks.net> | 2025-11-11 21:45:08 +0100 |
|---|---|---|
| committer | Markus Uhlin <markus@nifty-networks.net> | 2025-11-11 21:45:08 +0100 |
| commit | b372c97b3a3dadcc2c5ef8aba5a453b6af1e8010 (patch) | |
| tree | 75d8a57c831a50af50de56dd5f00fbf3e969d197 /FICS/lists.c | |
| parent | c7f512e3e95f79425d7e826650df41d5069a9eb0 (diff) | |
Array bounds checking (found by PVS-Studio)
Diffstat (limited to 'FICS/lists.c')
| -rw-r--r-- | FICS/lists.c | 2 |
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 { |
