Patch 9.0.0060 Problem: Accessing uninitialized memory when completing long line. Solution: Terminate string with NUL. Files: src/insexpand.c, src/testdir/test_ins_complete.vim
*** ../vim-9.0.0059/src/insexpand.c 2022-07-15 20:45:11.130168352 +0100 --- src/insexpand.c 2022-07-23 06:51:07.949613376 +0100 *************** *** 642,647 **** --- 642,648 ---- // growarray. Add the character in the next round. if (ga_grow(&gap, IOSIZE) == FAIL) return (char_u *)"[failed]"; + *p = NUL; STRCPY(gap.ga_data, IObuff); gap.ga_len = (int)STRLEN(IObuff); } *** ../vim-9.0.0059/src/testdir/test_ins_complete.vim 2022-07-07 19:59:45.466244217 +0100 --- src/testdir/test_ins_complete.vim 2022-07-23 06:46:41.445517250 +0100 *************** *** 2108,2113 **** --- 2108,2120 ---- exe "normal 2Go\<C-X>\<C-L>\<Esc>" call assert_equal(longLine, getline(3)) + " check that the too long text is NUL terminated + %del + norm o + norm 1987ax + exec "norm ox\<C-X>\<C-L>" + call assert_equal(repeat('x', 1987), getline(3)) + bwipe! set noic noinfercase endfunc *** ../vim-9.0.0059/src/version.c 2022-07-23 06:24:56.409106034 +0100 --- src/version.c 2022-07-23 06:52:32.717639744 +0100 *************** *** 737,738 **** --- 737,740 ---- { /* Add new patch number below this line */ + /**/ + 60, /**/ -- hundred-and-one symptoms of being an internet addict: 101. U can read htis w/o ny porblm and cant figur eout Y its evn listd. /// Bram Moolenaar -- b...@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 /// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/20220723081053.DEE6F1C0909%40moolenaar.net.