Commit 2b7b3e1f by Vicent Martí

Merge pull request #1193 from libgit2/no-newline-packed-refs

Handle packed refs with no trailing newline
parents 7511d8b4 ef82ff30
......@@ -373,7 +373,7 @@ static int packed_parse_oid(
refname_end = memchr(refname_begin, '\n', buffer_end - refname_begin);
if (refname_end == NULL)
goto corrupt;
refname_end = buffer_end;
if (refname_end[-1] == '\r')
refname_end--;
......
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