Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
104a1b0b
Commit
104a1b0b
authored
Feb 02, 2017
by
Edward Thomson
Committed by
GitHub
Feb 02, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4105 from pks-t/pks/vector-reverse-overflow
Vector reverse overflow
parents
9ba610a1
f47db3c7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
src/vector.c
+3
-0
tests/revwalk/basic.c
+14
-0
No files found.
src/vector.c
View file @
104a1b0b
...
@@ -406,6 +406,9 @@ void git_vector_reverse(git_vector *v)
...
@@ -406,6 +406,9 @@ void git_vector_reverse(git_vector *v)
{
{
size_t
a
,
b
;
size_t
a
,
b
;
if
(
v
->
length
==
0
)
return
;
a
=
0
;
a
=
0
;
b
=
v
->
length
-
1
;
b
=
v
->
length
-
1
;
...
...
tests/revwalk/basic.c
View file @
104a1b0b
...
@@ -331,6 +331,20 @@ void test_revwalk_basic__hide_then_push(void)
...
@@ -331,6 +331,20 @@ void test_revwalk_basic__hide_then_push(void)
cl_assert_equal_i
(
i
,
0
);
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
)
void
test_revwalk_basic__push_range
(
void
)
{
{
revwalk_basic_setup_walk
(
NULL
);
revwalk_basic_setup_walk
(
NULL
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment