libgit2/libgit2 — pull request #2535 by carlosmn (2014-08-26 13:12:36+00:00)
Title: pack: return the correct final offset

The callers of git_packfile_unpack() expect the obj_offset argument to
be set to the beginning of the next object. We were mistakenly returning
the the offset of the object's data, which causes the CRC function to
try to use the wrong offset.

Set obj_offset to curpos instead of elem->offset to point to the next
element and bring back expected behaviour.

---

This is one for backporting too @vmg