From: Liam Beguin Date: Sun, 3 Dec 2017 22:17:15 +0000 (-0500) Subject: rebase -i: set commit to null in exec commands X-Git-Tag: v2.16.0-rc0~35^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7dcbb3cb6d4f06ff305e5a18dba873261d3fa5d3;p=thirdparty%2Fgit.git 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 --- diff --git a/sequencer.c b/sequencer.c index fa94ed652d..5033b049d9 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;