1
0
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:
Bram Moolenaar
2022-06-01 15:23:13 +01:00
parent 00e977cb83
commit 409510c588
3 changed files with 31 additions and 3 deletions

View File

@@ -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()