Skip to content

Commit 7dcbb3c

Browse files
liambeguingitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f3b633d commit 7dcbb3c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sequencer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,6 +1268,7 @@ static int parse_insn_line(struct todo_item *item, const char *bol, char *eol)
12681268
bol += padding;
12691269

12701270
if (item->command == TODO_EXEC) {
1271+
item->commit = NULL;
12711272
item->arg = bol;
12721273
item->arg_len = (int)(eol - bol);
12731274
return 0;

0 commit comments

Comments
 (0)