0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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)
This commit is contained in:
Bram Moolenaar
2017-02-23 18:08:56 +01:00
parent 24922ec233
commit 60629d6425
3 changed files with 11 additions and 1 deletions

View File

@@ -8181,7 +8181,8 @@ in_cinkeys(
{
if (try_match && *look == keytyped)
return TRUE;
++look;
if (*look != NUL)
++look;
}
/*

View File

@@ -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 File

@@ -764,6 +764,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
358,
/**/
357,
/**/