mirror of
https://github.com/reactos/ccache.git
synced 2024-11-26 21:20:32 +00:00
Avoid overflowing counter when converting obsolete max size
This commit is contained in:
parent
1285bfd33a
commit
d24b26cb1c
2
stats.c
2
stats.c
@ -373,7 +373,7 @@ stats_get_obsolete_limits(const char *dir, unsigned *maxfiles, uint64_t *maxsize
|
||||
char *sname = format("%s/stats", dir);
|
||||
stats_read(sname, counters);
|
||||
*maxfiles = counters->data[STATS_OBSOLETE_MAXFILES];
|
||||
*maxsize = counters->data[STATS_OBSOLETE_MAXSIZE] * 1024;
|
||||
*maxsize = (uint64_t)counters->data[STATS_OBSOLETE_MAXSIZE] * 1024;
|
||||
free(sname);
|
||||
counters_free(counters);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user