To: vim_dev@googlegroups.com Subject: Patch 8.2.4214 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4214 Problem: Illegal memory access with large 'tabstop' in Ex mode. Solution: Allocate enough memory. Files: src/ex_getln.c, src/testdir/test_ex_mode.vim *** ../vim-8.2.4213/src/ex_getln.c 2022-01-15 18:25:04.657419390 +0000 --- src/ex_getln.c 2022-01-25 11:51:11.659890443 +0000 *************** *** 1513,1519 **** ccline.cmdindent = (firstc > 0 ? indent : 0); // alloc initial ccline.cmdbuff ! alloc_cmdbuff(exmode_active ? 250 : indent + 1); if (ccline.cmdbuff == NULL) return FAIL; ccline.cmdlen = ccline.cmdpos = 0; --- 1513,1519 ---- ccline.cmdindent = (firstc > 0 ? indent : 0); // alloc initial ccline.cmdbuff ! alloc_cmdbuff(indent + 50); if (ccline.cmdbuff == NULL) return FAIL; ccline.cmdlen = ccline.cmdpos = 0; *** ../vim-8.2.4213/src/testdir/test_ex_mode.vim 2021-12-05 12:06:18.887815813 +0000 --- src/testdir/test_ex_mode.vim 2022-01-25 11:49:30.274452471 +0000 *************** *** 241,244 **** --- 241,254 ---- call delete('Xexmodescript') endfunc + func Test_ex_mode_large_indent() + new + set ts=500 ai + call setline(1, "\t") + exe "normal gQi\." + set ts=8 noai + bwipe! + endfunc + + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.2.4213/src/version.c 2022-01-25 10:30:52.477915877 +0000 --- src/version.c 2022-01-25 10:45:35.059647140 +0000 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 4214, /**/ -- Snoring is prohibited unless all bedroom windows are closed and securely locked. [real standing law in Massachusetts, United States of America] /// 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 ///