On Mon, Jun 21, 2021 at 06:25:26PM -0400, Taylor Blau wrote:
quoted hunk ↗ jump to hunk
static int load_bitmap_entries_v1(struct bitmap_index *index)
{
uint32_t i;@@ -242,9 +249,7 @@ static int load_bitmap_entries_v1(struct bitmap_index *index)
xor_offset = read_u8(index->map, &index->map_pos);
flags = read_u8(index->map, &index->map_pos);
- if (nth_packed_object_id(&oid, index->pack, commit_idx_pos) < 0)
- return error("corrupt ewah bitmap: commit index %u out of range",
- (unsigned)commit_idx_pos);
+ nth_bitmap_object_oid(index, &oid, commit_idx_pos);
Oops. I was reading code in this area and noticed that this patch drops
the check introduced by c6b0c3910c (pack-bitmap.c: check reads more
aggressively when loading, 2020-12-08).
I fixed it up locally by restoring the check (but on the new function
nth_bitmap_object_oid() instead), and will send it in a reroll.
Thanks,
Taylor