0
0
mirror of https://github.com/vim/vim.git synced 2025-10-04 05:25:06 -04:00

patch 8.2.3612: using freed memory with regexp using a mark

Problem:    Using freed memory with regexp using a mark.
Solution:   Get the line again after getting the mark position.
This commit is contained in:
Bram Moolenaar
2021-11-17 18:22:56 +00:00
parent 615ddd5342
commit 64066b9acd
4 changed files with 19 additions and 1 deletions

View File

@@ -1037,4 +1037,12 @@ func Test_matching_pos()
set re&
endfunc
func Test_using_mark_position()
" this was using freed memory
new
norm O0
call assert_fails("s/\\%')", 'E486:')
bwipe!
endfunc
" vim: shiftwidth=2 sts=2 expandtab