From 0019886a84c7dfdaf452c8a715f26eb87c697b1b Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 11 May 2022 19:07:31 +0800 Subject: vim-patch:8.2.4901: NULL pointer access when using invalid pattern Problem: NULL pointer access when using invalid pattern. Solution: Check for failed regexp program. https://github.com/vim/vim/commit/8e4b76da1d7e987d43ca960dfbc372d1c617466f --- src/nvim/testdir/test_buffer.vim | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/nvim/testdir/test_buffer.vim') diff --git a/src/nvim/testdir/test_buffer.vim b/src/nvim/testdir/test_buffer.vim index a31cdbb49a..7734094584 100644 --- a/src/nvim/testdir/test_buffer.vim +++ b/src/nvim/testdir/test_buffer.vim @@ -61,4 +61,11 @@ func Test_buffer_scheme() set shellslash& endfunc +" this was using a NULL pointer after failing to use the pattern +func Test_buf_pattern_invalid() + vsplit 0000000 + silent! buf [0--]\&\zs*\zs*e + bwipe! +endfunc + " vim: shiftwidth=2 sts=2 expandtab -- cgit