Commit 4d4c8e0a by lhchavez

Re-adding the "delta offset is zero" error case

parent ba59a4a2
......@@ -930,6 +930,9 @@ int get_delta_base(
git_oid_fromraw(&oid, base_info);
if ((entry = git_oidmap_get(p->idx_cache, &oid)) != NULL) {
if (entry->offset == 0)
return packfile_error("delta offset is zero");
*curpos += 20;
*delta_base_out = entry->offset;
return 0;
......@@ -949,6 +952,9 @@ int get_delta_base(
} else
return packfile_error("unknown object type");
if (base_offset == 0)
return packfile_error("delta offset is zero");
*delta_base_out = base_offset;
return 0;
}
......
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