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. (cherry picked from commit aa8cb5866f1eabd92c8c08f7a8610d42df07375f)
diff --git a/src/revwalk.c b/src/revwalk.c
index eb228a5..290313a 100644
--- a/src/revwalk.c
+++ b/src/revwalk.c
@@ -522,7 +522,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;