Skip to content

Commit aa8cb58

Browse files
committed
revwalk: The left operand of '<' is a garbage value
At line 594, we do this : if (error < 0) return error; but if nothing was pushed in a GIT_SORT_TIME revwalk, we'd return uninitialized stack data.
1 parent 5b0258a commit aa8cb58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/revwalk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ static int sort_in_topological_order(git_commit_list **out, git_revwalk *walk, g
550550

551551
static int prepare_walk(git_revwalk *walk)
552552
{
553-
int error;
553+
int error = 0;
554554
git_commit_list *list, *commits = NULL;
555555
git_commit_list_node *next;
556556

0 commit comments

Comments
 (0)