Patch 8.2.1910
Problem:    Reading past the end of the command line.
Solution:   Check for NUL. (closes #7204)
Files:      src/ex_docmd.c, src/testdir/test_edit.vim


*** ../vim-8.2.1909/src/ex_docmd.c      2020-10-24 20:49:37.494683051 +0200
--- src/ex_docmd.c      2020-10-26 21:37:35.104048205 +0100
***************
*** 2958,2965 ****
        cmod->cmod_save_ei = NULL;
      }
  
!     if (cmod->cmod_filter_regmatch.regprog != NULL)
!       vim_regfree(cmod->cmod_filter_regmatch.regprog);
  
      if (cmod->cmod_save_msg_silent > 0)
      {
--- 2958,2964 ----
        cmod->cmod_save_ei = NULL;
      }
  
!     vim_regfree(cmod->cmod_filter_regmatch.regprog);
  
      if (cmod->cmod_save_msg_silent > 0)
      {
***************
*** 4696,4701 ****
--- 4695,4702 ----
        {
            p += 2;
            (void)skip_expr(&p, NULL);
+           if (*p == NUL)              // stop at NUL after CTRL-V
+               break;
        }
  #endif
  
*** ../vim-8.2.1909/src/testdir/test_edit.vim   2020-10-21 12:19:50.080854732 
+0200
--- src/testdir/test_edit.vim   2020-10-26 21:19:31.479465757 +0100
***************
*** 1832,1835 ****
--- 1832,1842 ----
    bwipe!
  endfunc
  
+ func Test_read_invalid()
+   set encoding=latin1
+   " This was not properly checking for going past the end.
+   call assert_fails('r`=', 'E484')
+   set encoding=utf-8
+ endfunc
+ 
  " vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.2.1909/src/version.c       2020-10-26 21:05:23.905469139 +0100
--- src/version.c       2020-10-26 21:38:53.591737578 +0100
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     1910,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
133. You communicate with people on other continents more than you
     do with your own neighbors.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            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/202010262039.09QKdkNx1696069%40masaka.moolenaar.net.

Raspunde prin e-mail lui