Fix overflow if someone has more than 100 groups somehow.
Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
parent
e3cdfce3aa
commit
f7335c8761
2
sus.c
2
sus.c
@ -19,7 +19,7 @@ read_ids()
|
|||||||
{
|
{
|
||||||
FILE *f = fopen("/etc/sus", "r");
|
FILE *f = fopen("/etc/sus", "r");
|
||||||
if (!f) return 0;
|
if (!f) return 0;
|
||||||
while (!feof(f))
|
while (!feof(f) && ids_len < 99)
|
||||||
fscanf(f, "%lld", &ids[ids_len++]);
|
fscanf(f, "%lld", &ids[ids_len++]);
|
||||||
if (ids_len == 0) return 0;
|
if (ids_len == 0) return 0;
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user