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\<CR>."
+   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 -- [email protected] -- 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220125115535.EFD9A1C042A%40moolenaar.net.

Raspunde prin e-mail lui