Commit 2a707d0e by Scott J. Goldman

Revert "Handle packed peeled objects without trailing newlines"

This reverts commit 28b1cdf3.

//cc #1262 #1267
parent 148c786c
...@@ -328,7 +328,7 @@ static int packed_parse_peel( ...@@ -328,7 +328,7 @@ static int packed_parse_peel(
if (git__prefixcmp(tag_ref->name, GIT_REFS_TAGS_DIR) != 0) if (git__prefixcmp(tag_ref->name, GIT_REFS_TAGS_DIR) != 0)
goto corrupt; goto corrupt;
if (buffer + GIT_OID_HEXSZ > buffer_end) if (buffer + GIT_OID_HEXSZ >= buffer_end)
goto corrupt; goto corrupt;
/* Is this a valid object id? */ /* Is this a valid object id? */
...@@ -339,13 +339,10 @@ static int packed_parse_peel( ...@@ -339,13 +339,10 @@ static int packed_parse_peel(
if (*buffer == '\r') if (*buffer == '\r')
buffer++; buffer++;
if (*buffer == '\n') if (*buffer != '\n')
buffer++;
if (buffer != buffer_end)
goto corrupt; goto corrupt;
*buffer_out = buffer; *buffer_out = buffer + 1;
return 0; return 0;
corrupt: corrupt:
......
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