1
0
forked from aniani/vim

patch 8.2.4646: using buffer line after it has been freed

Problem:    Using buffer line after it has been freed in old regexp engine.
Solution:   After getting mark get the line again.
This commit is contained in:
Bram Moolenaar
2022-03-29 13:24:58 +01:00
parent fd01280d01
commit b55986c52d
3 changed files with 18 additions and 0 deletions

View File

@@ -1042,10 +1042,17 @@ endfunc
func Test_using_mark_position()
" this was using freed memory
" new engine
new
norm O0
call assert_fails("s/\\%')", 'E486:')
bwipe!
" old engine
new
norm O0
call assert_fails("s/\\%#=1\\%')", 'E486:')
bwipe!
endfunc
func Test_using_visual_position()