To: vim_dev@googlegroups.com Subject: Patch 8.2.4632 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4632 Problem: Using freed memory in flatten(). Solution: Clear typval after recursing into list. Files: src/list.c *** ../vim-8.2.4631/src/list.c 2022-03-26 10:50:06.546446647 +0000 --- src/list.c 2022-03-26 16:40:30.111648101 +0000 *************** *** 953,964 **** list_free_item(list, item); return; } - clear_tv(&item->li_tv); if (maxdepth > 0) list_flatten(list, item->li_prev == NULL ? list->lv_first : item->li_prev->li_next, itemlist->lv_len, maxdepth - 1); list_free_item(list, item); } --- 953,964 ---- list_free_item(list, item); return; } if (maxdepth > 0) list_flatten(list, item->li_prev == NULL ? list->lv_first : item->li_prev->li_next, itemlist->lv_len, maxdepth - 1); + clear_tv(&item->li_tv); list_free_item(list, item); } *** ../vim-8.2.4631/src/version.c 2022-03-26 16:28:01.943874159 +0000 --- src/version.c 2022-03-26 16:41:40.187590018 +0000 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 4632, /**/ -- ARTHUR: Be quiet! DENNIS: Well you can't expect to wield supreme executive power just 'cause some watery tart threw a sword at you! ARTHUR: Shut up! DENNIS: I mean, if I went around sayin' I was an empereror just because some moistened bint had lobbed a scimitar at me they'd put me away! The Quest for the Holy Grail (Monty Python) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///