Thomas Gummerer <t.gummerer@xxxxxxxxx> writes: > This part is called even before we know what version of the index > we will read, and before the file is mmaped. The best solution > i think is to drop the check and just call verify_hdr, ... Exactly. And do the length checking inside verify_hdr() or its callee where we know what the minimum length is depending on the version as necessary to avoid over-reading. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html