From d24b26cb1c3e6d5bf895729ea8fab35f762acad4 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Tue, 3 Jul 2012 11:52:37 +0200 Subject: [PATCH] Avoid overflowing counter when converting obsolete max size --- stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stats.c b/stats.c index d3054d95b..2286ef3e0 100644 --- a/stats.c +++ b/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); } -- 2.47.3