mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.2.4214: illegal memory access with large 'tabstop' in Ex mode
Problem: Illegal memory access with large 'tabstop' in Ex mode.
Solution: Allocate enough memory.
85b6747abc
This commit is contained in:
parent
17e2938b10
commit
de673966c3
@ -772,7 +772,7 @@ static uint8_t *command_line_enter(int firstc, long count, int indent)
|
||||
ccline.cmdindent = (s->firstc > 0 ? s->indent : 0);
|
||||
|
||||
// alloc initial ccline.cmdbuff
|
||||
alloc_cmdbuff(exmode_active ? 250 : s->indent + 1);
|
||||
alloc_cmdbuff(indent + 50);
|
||||
ccline.cmdlen = ccline.cmdpos = 0;
|
||||
ccline.cmdbuff[0] = NUL;
|
||||
|
||||
|
@ -98,4 +98,14 @@ func Test_ex_mode_count_overflow()
|
||||
call delete('Xexmodescript')
|
||||
endfunc
|
||||
|
||||
func Test_ex_mode_large_indent()
|
||||
new
|
||||
set ts=500 ai
|
||||
call setline(1, "\t")
|
||||
exe "normal gQi\<CR>."
|
||||
set ts=8 noai
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
Loading…
Reference in New Issue
Block a user