mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-03 02:08:28 +00:00
repo::iterator: don't go out of bounds
This commit is contained in:
parent
f0224772ee
commit
277c85eb1c
@ -53,7 +53,7 @@ static void expect_iterator_items(
|
||||
cl_assert(entry->mode != GIT_FILEMODE_TREE);
|
||||
}
|
||||
|
||||
if (++count > expected_flat)
|
||||
if (++count >= expected_flat)
|
||||
break;
|
||||
}
|
||||
|
||||
@ -99,7 +99,7 @@ static void expect_iterator_items(
|
||||
cl_assert(!error || error == GIT_ITEROVER);
|
||||
}
|
||||
|
||||
if (++count > expected_total)
|
||||
if (++count >= expected_total)
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user