mirror of https://github.com/borgbackup/borg.git
fix issue with negative "all archives" size, fixes #165
This fixes a infrequent problem when (refcount * chunksize) overflowed a int32_t. chunksize is always <= 8MiB and usually rather ~64KiB (with default chunker params). Thus, this happened only for high refcounts and/or unusually big chunks.
This commit is contained in:
parent
1a949eab3e
commit
d779057b79
|
@ -380,8 +380,8 @@ hashindex_summarize(HashIndex *index, long long *total_size, long long *total_cs
|
|||
chunks += values[0];
|
||||
unique_size += values[1];
|
||||
unique_csize += values[2];
|
||||
size += values[0] * values[1];
|
||||
csize += values[0] * values[2];
|
||||
size += (int64_t) values[0] * values[1];
|
||||
csize += (int64_t) values[0] * values[2];
|
||||
}
|
||||
*total_size = size;
|
||||
*total_csize = csize;
|
||||
|
|
Loading…
Reference in New Issue