1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-01-30 19:21:17 +00:00

hashindex_summarize: fix missing byte-order conversion

Fixes #886
This commit is contained in:
Marian Beermann 2016-04-11 22:08:07 +02:00
parent d8c630b2d7
commit 90a9fbd21d
No known key found for this signature in database
GPG key ID: 9B8450B91D1362C1

View file

@ -452,11 +452,11 @@ hashindex_summarize(HashIndex *index, long long *total_size, long long *total_cs
while((key = hashindex_next_key(index, key))) { while((key = hashindex_next_key(index, key))) {
values = key + index->key_size; values = key + index->key_size;
unique_chunks++; unique_chunks++;
chunks += values[0]; chunks += _le32toh(values[0]);
unique_size += values[1]; unique_size += _le32toh(values[1]);
unique_csize += values[2]; unique_csize += _le32toh(values[2]);
size += (int64_t) values[0] * values[1]; size += (int64_t) _le32toh(values[0]) * _le32toh(values[1]);
csize += (int64_t) values[0] * values[2]; csize += (int64_t) _le32toh(values[0]) * _le32toh(values[2]);
} }
*total_size = size; *total_size = size;
*total_csize = csize; *total_csize = csize;