diff options
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/util.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shared/util.c b/src/shared/util.c index 92b4d498fe..dfaf7f7f45 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -5184,6 +5184,9 @@ char *format_bytes(char *buf, size_t l, off_t t) { { "K", 1024ULL }, }; + if (t == (off_t) -1) + return NULL; + for (i = 0; i < ELEMENTSOF(table); i++) { if (t >= table[i].factor) { |