summaryrefslogtreecommitdiffstats
path: root/pack-bitmap.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-06-18 11:23:22 -0700
committerJunio C Hamano <gitster@pobox.com>2018-06-18 11:23:22 -0700
commitf35f43f565c99d5cbbac210b82448d9f445c9607 (patch)
treeb03ce86ff4b83a5a3d57675862308310413ae959 /pack-bitmap.c
parent1663e2ba6863afa949dd84b3286b52290049daa9 (diff)
parent1140bf01ecf4a49c32b3c385dd782cd183e730af (diff)
downloadgit-f35f43f565c99d5cbbac210b82448d9f445c9607.tar.gz
git-f35f43f565c99d5cbbac210b82448d9f445c9607.tar.xz
Merge branch 'jk/ewah-bounds-check'
The code to read compressed bitmap was not careful to avoid reading past the end of the file, which has been corrected. * jk/ewah-bounds-check: ewah: adjust callers of ewah_read_mmap() ewah_read_mmap: bounds-check mmap reads
Diffstat (limited to 'pack-bitmap.c')
-rw-r--r--pack-bitmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pack-bitmap.c b/pack-bitmap.c
index 06771113f..18f8b22ae 100644
--- a/pack-bitmap.c
+++ b/pack-bitmap.c
@@ -120,7 +120,7 @@ static struct ewah_bitmap *read_bitmap_1(struct bitmap_index *index)
{
struct ewah_bitmap *b = ewah_pool_new();
- int bitmap_size = ewah_read_mmap(b,
+ ssize_t bitmap_size = ewah_read_mmap(b,
index->map + index->map_pos,
index->map_size - index->map_pos);