Patch 8.2.0112

6 views
Skip to first unread message

Bram Moolenaar

unread,
Jan 12, 2020, 7:54:07 AM1/12/20
to vim...@googlegroups.com

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 -- Br...@Moolenaar.net -- 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 ///
Reply all
Reply to author
Forward
0 new messages