Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiam Beguin <liambeguin@gmail.com>2017-12-04 01:17:15 +0300
committerJunio C Hamano <gitster@pobox.com>2017-12-04 20:02:21 +0300
commit7dcbb3cb6d4f06ff305e5a18dba873261d3fa5d3 (patch)
treeee7da85597b6eaf7698e817cad86cc2bf83dd2f8 /sequencer.c
parentf3b633dad4cc54c7cdaa007e97d00b2c935c9a90 (diff)
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 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;