Patch 8.2.0112
Problem:    Illegal memory access when using 'cindent'.
Solution:   Check for NUL byte. (Dominique Pelle, closes #5470)
Files:      src/cindent.c, src/testdir/test_cindent.vim


*** ../vim-8.2.0111/src/cindent.c       2019-11-30 20:49:29.000000000 +0100
--- src/cindent.c       2020-01-12 13:46:55.831567241 +0100
***************
*** 582,587 ****
--- 582,589 ----
        for (s += 4; *s; ++s)
        {
            s = cin_skipcomment(s);
+           if (*s == NUL)
+               break;
            if (*s == ':')
            {
                if (s[1] == ':')        // skip over "::" for C++
*** ../vim-8.2.0111/src/testdir/test_cindent.vim        2019-09-01 
14:36:29.000000000 +0200
--- src/testdir/test_cindent.vim        2020-01-12 13:46:12.063716366 +0100
***************
*** 5251,5254 ****
--- 5251,5263 ----
    enew! | close
  endfunc
  
+ " this was going beyond the end of the line.
+ func Test_cindent_case()
+   new
+   call setline(1, "case x: // x")
+   set cindent
+   norm! f:a:
+   bwipe!
+ endfunc
+ 
  " vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.2.0111/src/version.c       2020-01-11 16:05:19.594287610 +0100
--- src/version.c       2020-01-12 13:42:21.860426962 +0100
***************
*** 744,745 ****
--- 744,747 ----
  {   /* Add new patch number below this line */
+ /**/
+     112,
  /**/

-- 
FROG: How you English say:  I one more time, mac, I unclog my nose towards
      you, sons of a window-dresser,  so, you think you could out-clever us
      French fellows with your silly knees-bent creeping about advancing
      behaviour.  (blows a raspberry) I wave my private parts at your aunties,
      you brightly-coloured, mealy-templed, cranberry-smelling, electric
      donkey-bottom biters.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// 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/202001121253.00CCrvGQ011624%40masaka.moolenaar.net.

Raspunde prin e-mail lui