From c0e038a29b28b43e5bf5e4c246a8fa5fa2bb2cd9 Mon Sep 17 00:00:00 2001 From: Etienne Samson Date: Tue, 21 Aug 2018 01:12:11 +0200 Subject: 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) --- src/revwalk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/revwalk.c b/src/revwalk.c index eb228a522..290313a3b 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; -- cgit v1.2.1