forked from aniani/vim
patch 8.2.4979: accessing freed memory when line is flushed
Problem: Accessing freed memory when line is flushed. Solution: Make a copy of the pattern to search for.
This commit is contained in:
@@ -1392,6 +1392,15 @@ func Test_macro_search()
|
||||
close!
|
||||
endfunc
|
||||
|
||||
func Test_define_search()
|
||||
" this was accessing freed memory
|
||||
new
|
||||
call setline(1, ['first line', '', '#define something 0'])
|
||||
sil norm o0
|
||||
sil! norm
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
" Test for [*, [/, ]* and ]/
|
||||
func Test_comment_search()
|
||||
new
|
||||
|
||||
Reference in New Issue
Block a user