summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Liam Beguin <liambeguin@gmail.com>2017-12-03 17:17:15 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-12-04 09:02:21 -0800
commit7dcbb3cb6d4f06ff305e5a18dba873261d3fa5d3 (patch)
treeee7da85597b6eaf7698e817cad86cc2bf83dd2f8
parentDocumentation: use preferred name for the 'todo list' script (diff)
downloadtgif-7dcbb3cb6d4f06ff305e5a18dba873261d3fa5d3.tar.xz
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 <liambeguin@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--sequencer.c1
1 files changed, 1 insertions, 0 deletions
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;