forked from aniani/vim
patch 8.2.5072: using uninitialized value and freed memory in spell command
Problem: Using uninitialized value and freed memory in spell command. Solution: Initialize "attr". Check for empty line early.
This commit is contained in:
@@ -802,5 +802,20 @@ func Test_word_index()
|
||||
call delete('Xtmpfile')
|
||||
endfunc
|
||||
|
||||
func Test_check_empty_line()
|
||||
" This was using freed memory
|
||||
enew
|
||||
spellgood! fl
|
||||
norm z=
|
||||
norm yy
|
||||
sil! norm P]svc
|
||||
norm P]s
|
||||
|
||||
" set 'encoding' to clear the wordt list
|
||||
set enc=latin1
|
||||
set enc=utf-8
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
||||
Reference in New Issue
Block a user