From 4ab4ecc7afbfdfb081b28670b33af87b8dd2e4ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Borgstr=C3=B6m?= Date: Tue, 6 Jan 2015 22:28:04 +0100 Subject: [PATCH] hashindex: Fix issue with file sizes larger than 2GB. See: http://librelist.com/browser//attic/2015/1/6/does-attic-have-an-upper-data-size-limit/ --- CHANGES | 1 + attic/_hashindex.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index d8cff9d39..2263a5448 100644 --- a/CHANGES +++ b/CHANGES @@ -7,6 +7,7 @@ Version 0.15 ------------ (feature release, released on X) +- Fix issue with hash index files larger than 2GB. - Fix Python 3.2 compatibility issue with noatime open() (#164) - Include missing pyx files in dist files (#168) diff --git a/attic/_hashindex.c b/attic/_hashindex.c index b0cd11bff..c0c541287 100644 --- a/attic/_hashindex.c +++ b/attic/_hashindex.c @@ -162,7 +162,7 @@ hashindex_read(const char *path) EPRINTF_PATH(path, "Unknown file header"); goto fail; } - if(length != sizeof(HashHeader) + _le32toh(header.num_buckets) * (header.key_size + header.value_size)) { + if(length != sizeof(HashHeader) + (off_t)_le32toh(header.num_buckets) * (header.key_size + header.value_size)) { EPRINTF_PATH(path, "Incorrect file length"); goto fail; }