mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:7.4.1968 (#5949)
Problem: Invalid memory access with "\<C-">.
Solution: Do not recognize this as a special character. (Dominique Pelle)
1d90a5a5af
This commit is contained in:
parent
b98da8de98
commit
c88e4a270d
@ -573,8 +573,10 @@ int find_special_key(const char_u **srcp, const size_t src_len, int *const modp,
|
|||||||
} else {
|
} else {
|
||||||
l = 1;
|
l = 1;
|
||||||
}
|
}
|
||||||
if (end - bp > l && bp[l + 1] == '>') {
|
if (end - bp > l && bp[l] != '"' && bp[l + 1] == '>') {
|
||||||
bp += l; // anything accepted, like <C-?>
|
// Anything accepted, like <C-?>, except <C-">, because the "
|
||||||
|
// ends the string.
|
||||||
|
bp += l;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -92,3 +92,8 @@ endfunc
|
|||||||
func Test_set_reg_null_list()
|
func Test_set_reg_null_list()
|
||||||
call setreg('x', v:_null_list)
|
call setreg('x', v:_null_list)
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_special_char()
|
||||||
|
" The failure is only visible using valgrind.
|
||||||
|
call assert_fails('echo "\<C-">')
|
||||||
|
endfunc
|
||||||
|
@ -472,7 +472,7 @@ static int included_patches[] = {
|
|||||||
1971,
|
1971,
|
||||||
1970,
|
1970,
|
||||||
// 1969 NA
|
// 1969 NA
|
||||||
// 1968,
|
1968,
|
||||||
1967,
|
1967,
|
||||||
1966,
|
1966,
|
||||||
// 1965 NA
|
// 1965 NA
|
||||||
|
Loading…
Reference in New Issue
Block a user