mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-02 17:42:31 +00:00
Merge pull request #1136 from pclouds/tree-cache-counts
tree cache: loosen negative entry count check
This commit is contained in:
commit
6cacd44bd0
@ -104,7 +104,7 @@ static int read_tree_internal(git_tree_cache **out,
|
||||
tree->name[name_len] = '\0';
|
||||
|
||||
/* Blank-terminated ASCII decimal number of entries in this tree */
|
||||
if (git__strtol32(&count, buffer, &buffer, 10) < 0 || count < -1)
|
||||
if (git__strtol32(&count, buffer, &buffer, 10) < 0)
|
||||
goto corrupted;
|
||||
|
||||
tree->entries = count;
|
||||
|
Loading…
Reference in New Issue
Block a user