Commit 104a1b0b by Edward Thomson Committed by GitHub

Merge pull request #4105 from pks-t/pks/vector-reverse-overflow

Vector reverse overflow
parents 9ba610a1 f47db3c7
......@@ -406,6 +406,9 @@ void git_vector_reverse(git_vector *v)
{
size_t a, b;
if (v->length == 0)
return;
a = 0;
b = v->length - 1;
......
......@@ -331,6 +331,20 @@ void test_revwalk_basic__hide_then_push(void)
cl_assert_equal_i(i, 0);
}
void test_revwalk_basic__topo_crash(void)
{
git_oid oid;
git_oid_fromstr(&oid, "5b5b025afb0b4c913b4c338a42934a3863bf3644");
revwalk_basic_setup_walk(NULL);
git_revwalk_sorting(_walk, GIT_SORT_TOPOLOGICAL);
cl_git_pass(git_revwalk_push(_walk, &oid));
cl_git_pass(git_revwalk_hide(_walk, &oid));
git_revwalk_next(&oid, _walk);
}
void test_revwalk_basic__push_range(void)
{
revwalk_basic_setup_walk(NULL);
......
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