diff options
author | Slendi <slendi@socopon.com> | 2023-05-10 17:23:03 +0300 |
---|---|---|
committer | Slendi <slendi@socopon.com> | 2023-05-10 17:23:03 +0300 |
commit | f7335c87614b1a444b950c0f8e4247b1c6bdb236 (patch) | |
tree | f98c2ff619aaac056153696e7031731178d3ac8a | |
parent | e3cdfce3aa17d0d0463ce1a733a08203910bd338 (diff) |
Fix overflow if someone has more than 100 groups somehow.
Signed-off-by: Slendi <slendi@socopon.com>
-rw-r--r-- | sus.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -19,7 +19,7 @@ read_ids() { FILE *f = fopen("/etc/sus", "r"); if (!f) return 0; - while (!feof(f)) + while (!feof(f) && ids_len < 99) fscanf(f, "%lld", &ids[ids_len++]); if (ids_len == 0) return 0; return 1; |