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>
Liam Beguin committed
Dec 3, 2017 at 17:17 UTC
7dcbb3cb6d4f06ff305e5a18dba873261d3fa5d3
1 file changed
+1
sequencer.c
+1
@@ -1268,6 +1268,7 @@ static int parse_insn_line(struct todo_item *item, const char *bol, char *eol)
1268
bol += padding;
1269
1270
if (item->command == TODO_EXEC) {
1271
+ item->commit = NULL;
1272
item->arg = bol;
1273
item->arg_len = (int)(eol - bol);
1274
return 0;