1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-28 04:36:10 +02:00

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>
This commit is contained in:
Liam Beguin 2017-12-03 17:17:15 -05:00 committed by Junio C Hamano
parent f3b633dad4
commit 7dcbb3cb6d

View File

@ -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;