mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-11 06:17:43 +00:00
parent
d47c6aabfe
commit
28b1cdf3a1
@ -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,10 +339,13 @@ 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 + 1;
|
*buffer_out = buffer;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
corrupt:
|
corrupt:
|
||||||
|
Loading…
Reference in New Issue
Block a user