mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-07 02:50:10 +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);
|
cl_assert(entry->mode != GIT_FILEMODE_TREE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (++count > expected_flat)
|
if (++count >= expected_flat)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ static void expect_iterator_items(
|
|||||||
cl_assert(!error || error == GIT_ITEROVER);
|
cl_assert(!error || error == GIT_ITEROVER);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (++count > expected_total)
|
if (++count >= expected_total)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user