diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-09-17 19:43:23 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-09-17 19:43:23 +0100 |
commit | 1c3dd8ddcba63c1af5112e567215b3cec2de11d0 (patch) | |
tree | af01369780ad70339d079d0a9297d3dfe2b037b6 /src/testdir | |
parent | fb593c5350e8fe23b608ded5a011cd7eefe73922 (diff) |
patch 9.0.0490: using freed memory with cmdwin and BufEnter autocmdv9.0.0490
Problem: Using freed memory with cmdwin and BufEnter autocmd.
Solution: Make sure pointer to b_p_iminsert is still valid.
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_cmdwin.vim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/testdir/test_cmdwin.vim b/src/testdir/test_cmdwin.vim index d62673aba2..fe849bcc16 100644 --- a/src/testdir/test_cmdwin.vim +++ b/src/testdir/test_cmdwin.vim @@ -378,5 +378,15 @@ func Test_normal_escape() call assert_equal('" bar', @:) endfunc +" This was using a pointer to a freed buffer +func Test_cmdwin_freed_buffer_ptr() + au BufEnter * next 0| file + edit 0 + silent! norm q/ + + au! BufEnter + bwipe! +endfunc + " vim: shiftwidth=2 sts=2 expandtab |