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.
diff --git a/src/revwalk.c b/src/revwalk.c
index be647af..da84a44 100644
--- a/src/revwalk.c
+++ b/src/revwalk.c
@@ -550,7 +550,7 @@ cleanup:
static int prepare_walk(git_revwalk *walk)
{
- int error;
+ int error = 0;
git_commit_list *list, *commits = NULL;
git_commit_list_node *next;