diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2019-02-19 01:04:54 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-04-01 04:57:37 +0200 |
commit | 0f4d6cada83dc6bd6b6b24dc0d2b3e6460c645cb (patch) | |
tree | 1f2f29232c58ef66350f6c8eef4fae77a35b8fd4 /pack-bitmap.c | |
parent | khash: move oid hash table definition (diff) | |
download | git-0f4d6cada83dc6bd6b6b24dc0d2b3e6460c645cb.tar.xz git-0f4d6cada83dc6bd6b6b24dc0d2b3e6460c645cb.zip |
pack-bitmap: make bitmap header handling hash agnostic
Increase the checksum field in struct bitmap_disk_header to be
GIT_MAX_RAWSZ bytes in length and ensure that we hash the proper number
of bytes out when computing the bitmap checksum.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-bitmap.c')
-rw-r--r-- | pack-bitmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pack-bitmap.c b/pack-bitmap.c index 4695aaf6b4..b53f37243c 100644 --- a/pack-bitmap.c +++ b/pack-bitmap.c @@ -163,7 +163,7 @@ static int load_bitmap_header(struct bitmap_index *index) } index->entry_count = ntohl(header->entry_count); - index->map_pos += sizeof(*header); + index->map_pos += sizeof(*header) - GIT_MAX_RAWSZ + the_hash_algo->rawsz; return 0; } |