On Fri, Nov 13, 2020 at 04:49:28PM -0500, Taylor Blau wrote: > Thanks for your patient explanation. This hunk should instead read: > > + size_t header_size = sizeof(*header) - GIT_MAX_RAWSZ + the_hash_algo->rawsz; > > - if (index->map_size < sizeof(*header) + the_hash_algo->rawsz) > + if (index->map_size < header_size + the_hash_algo->rawsz) > return error("Corrupted bitmap index (missing header data)"); > > That error might not necessarily be right (it could say "missing header > or trailer data"), though. I'm open to if you think it should be > changed or not. Yeah, I agree it's misleading. In the idx code path we just say "%s is too small", which is more accurate. -Peff