aboutsummaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorLiam Beguin <liambeguin@gmail.com>2017-12-03 17:17:15 -0500
committerJunio C Hamano <gitster@pobox.com>2017-12-04 09:02:21 -0800
commit7dcbb3cb6d4f06ff305e5a18dba873261d3fa5d3 (patch)
treeee7da85597b6eaf7698e817cad86cc2bf83dd2f8 /sequencer.c
parentf3b633dad4cc54c7cdaa007e97d00b2c935c9a90 (diff)
downloadgit-7dcbb3cb6d4f06ff305e5a18dba873261d3fa5d3.tar.gz
git-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>
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c1
1 files changed, 1 insertions, 0 deletions
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;