From 7dcbb3cb6d4f06ff305e5a18dba873261d3fa5d3 Mon Sep 17 00:00:00 2001 From: Liam Beguin Date: Sun, 3 Dec 2017 17:17:15 -0500 Subject: [PATCH] rebase -i: set commit to null in exec commands Make sure commit is set to NULL when parsing exec instructions from the todo list. If not, we may try to access an uninitialized address later while updating the todo list. Signed-off-by: Liam Beguin Signed-off-by: Junio C Hamano --- sequencer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sequencer.c b/sequencer.c index fa94ed652..5033b049d 100644 --- a/sequencer.c +++ b/sequencer.c @@ -1268,6 +1268,7 @@ static int parse_insn_line(struct todo_item *item, const char *bol, char *eol) bol += padding; if (item->command == TODO_EXEC) { + item->commit = NULL; item->arg = bol; item->arg_len = (int)(eol - bol); return 0; -- 2.11.0