mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -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:
@@ -8181,7 +8181,8 @@ in_cinkeys(
|
|||||||
{
|
{
|
||||||
if (try_match && *look == keytyped)
|
if (try_match && *look == keytyped)
|
||||||
return TRUE;
|
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:")
|
call assert_fails("set " . a:name . "=/not.*there", "E474:")
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_cinkeys()
|
||||||
|
" This used to cause invalid memory access
|
||||||
|
set cindent cinkeys=0
|
||||||
|
norm a
|
||||||
|
set cindent& cinkeys&
|
||||||
|
endfunc
|
||||||
|
|
||||||
func Test_dictionary()
|
func Test_dictionary()
|
||||||
call Check_dir_option('dictionary')
|
call Check_dir_option('dictionary')
|
||||||
endfunc
|
endfunc
|
||||||
|
@@ -764,6 +764,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
358,
|
||||||
/**/
|
/**/
|
||||||
357,
|
357,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user