Permalink
Browse files

patch 8.0.0358: invalid memory access in C-indent code

Problem:    Invalid memory access in C-indent code.
Solution:   Don't go over end of empty line. (Dominique Pelle, closes #1492)
  • Loading branch information...
brammool committed Feb 23, 2017
1 parent 24922ec commit 60629d642541a089c322e65963c0a77e5f77eb79
Showing with 11 additions and 1 deletion.
  1. +2 −1 src/edit.c
  2. +7 −0 src/testdir/test_options.vim
  3. +2 −0 src/version.c
View
@@ -8181,7 +8181,8 @@ in_cinkeys(
{
if (try_match && *look == keytyped)
return TRUE;
- ++look;
+ if (*look != NUL)
+ ++look;
}
/*
@@ -135,6 +135,13 @@ func Check_dir_option(name)
call assert_fails("set " . a:name . "=/not.*there", "E474:")
endfunc
+func Test_cinkeys()
+ " This used to cause invalid memory access
+ set cindent cinkeys=0
+ norm a
+ set cindent& cinkeys&
+endfunc
+
func Test_dictionary()
call Check_dir_option('dictionary')
endfunc
View
@@ -764,6 +764,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 358,
/**/
357,
/**/

0 comments on commit 60629d6

Please sign in to comment.