Commit 6823506f authored by Junio C Hamano's avatar Junio C Hamano

Merge branch 'jk/verify-packfile-gently' into maint

A low-level function verify_packfile() was meant to show errors
that were detected without dying itself, but under some conditions
it didn't and died instead, which has been fixed.

* jk/verify-packfile-gently:
  verify_packfile: check pack validity before accessing data
parents fdb70b16 a9445d85
......@@ -57,11 +57,8 @@ static int verify_packfile(struct packed_git *p,
int err = 0;
struct idx_entry *entries;
/* Note that the pack header checks are actually performed by
* use_pack when it first opens the pack file. If anything
* goes wrong during those checks then the call will die out
* immediately.
*/
if (!is_pack_valid(p))
return error("packfile %s cannot be accessed", p->pack_name);
git_SHA1_Init(&ctx);
do {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment