Patch 9.0.1378
Problem:    Illegal memory access when using virtual editing.
Solution:   Make sure "startspaces" is not negative.
Files:      src/register.c, src/testdir/test_virtualedit.vim


*** ../vim-9.0.1377/src/register.c      2023-03-03 21:11:49.057414112 +0000
--- src/register.c      2023-03-04 14:11:40.678540655 +0000
***************
*** 1245,1250 ****
--- 1245,1252 ----
                                // double-count it.
                                bd.startspaces = (ce - cs + 1)
                                                          - oap->start.coladd;
+                               if (bd.startspaces < 0)
+                                   bd.startspaces = 0;
                                startcol++;
                            }
                        }
*** ../vim-9.0.1377/src/testdir/test_virtualedit.vim    2023-01-28 
19:18:56.741720608 +0000
--- src/testdir/test_virtualedit.vim    2023-03-04 14:10:43.066521272 +0000
***************
*** 88,93 ****
--- 88,103 ----
    set virtualedit=
  endfunc
  
+ func Test_edit_special_char()
+   new
+   se ve=all
+   norm a 0
+   sil! exe "norm o00000\<Nul>k<a0s"
+ 
+   bwipe!
+   set virtualedit=
+ endfunc
+ 
  " Tests for pasting at the beginning, end and middle of a tab character
  " in virtual edit mode.
  func Test_paste_in_tab()
*** ../vim-9.0.1377/src/version.c       2023-03-04 13:23:22.969812280 +0000
--- src/version.c       2023-03-04 14:09:04.498485723 +0000
***************
*** 697,698 ****
--- 697,700 ----
  {   /* Add new patch number below this line */
+ /**/
+     1378,
  /**/

-- 
Your fault: core dumped

 /// 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/20230304141404.D47241C0419%40moolenaar.net.

Raspunde prin e-mail lui