forked from aniani/vim
patch 8.2.5050: using freed memory when searching for pattern in path
Problem: Using freed memory when searching for pattern in path. Solution: Make a copy of the line.
This commit is contained in:
@@ -1290,6 +1290,17 @@ func Test_inc_search()
|
||||
close!
|
||||
endfunc
|
||||
|
||||
" this was using a line from ml_get() freed by the regexp
|
||||
func Test_isearch_copy_line()
|
||||
new
|
||||
norm o
|
||||
norm 0
|
||||
0norm o
|
||||
sil! norm bc0
|
||||
sil! isearch \%')
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
" Test for :dsearch, :dlist, :djump and :dsplit commands
|
||||
" Test for [d, ]d, [D, ]D, [ CTRL-D, ] CTRL-D and CTRL-W d commands
|
||||
func Test_macro_search()
|
||||
|
||||
Reference in New Issue
Block a user