File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -406,6 +406,9 @@ void git_vector_reverse(git_vector *v)
406406{
407407 size_t a , b ;
408408
409+ if (v -> length == 0 )
410+ return ;
411+
409412 a = 0 ;
410413 b = v -> length - 1 ;
411414
Original file line number Diff line number Diff line change @@ -331,6 +331,20 @@ void test_revwalk_basic__hide_then_push(void)
331331 cl_assert_equal_i (i , 0 );
332332}
333333
334+ void test_revwalk_basic__topo_crash (void )
335+ {
336+ git_oid oid ;
337+ git_oid_fromstr (& oid , "5b5b025afb0b4c913b4c338a42934a3863bf3644" );
338+
339+ revwalk_basic_setup_walk (NULL );
340+ git_revwalk_sorting (_walk , GIT_SORT_TOPOLOGICAL );
341+
342+ cl_git_pass (git_revwalk_push (_walk , & oid ));
343+ cl_git_pass (git_revwalk_hide (_walk , & oid ));
344+
345+ git_revwalk_next (& oid , _walk );
346+ }
347+
334348void test_revwalk_basic__push_range (void )
335349{
336350 revwalk_basic_setup_walk (NULL );
You can’t perform that action at this time.
0 commit comments