mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.4587: Vim9: double free after unpacking a list
Problem: Vim9: double free after unpacking a list. Solution: Make a copy of the value instead of moving it. (closes #9968)
This commit is contained in:
@@ -4773,7 +4773,10 @@ exec_instructions(ectx_T *ectx)
|
||||
li = li->li_next;
|
||||
for (i = 0; li != NULL; ++i)
|
||||
{
|
||||
list_set_item(rem_list, i, &li->li_tv);
|
||||
typval_T tvcopy;
|
||||
|
||||
copy_tv(&li->li_tv, &tvcopy);
|
||||
list_set_item(rem_list, i, &tvcopy);
|
||||
li = li->li_next;
|
||||
}
|
||||
--count;
|
||||
|
Reference in New Issue
Block a user