summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_buffer.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-05-07 11:28:06 +0100
committerBram Moolenaar <Bram@vim.org>2022-05-07 11:28:06 +0100
commit8e4b76da1d7e987d43ca960dfbc372d1c617466f (patch)
treeefbe309a2616fba361717918f55923a19dd65e04 /src/testdir/test_buffer.vim
parent801c3c1dbed88bfb59dcf25045365dc65f795f4e (diff)
patch 8.2.4901: NULL pointer access when using invalid patternv8.2.4901
Problem: NULL pointer access when using invalid pattern. Solution: Check for failed regexp program.
Diffstat (limited to 'src/testdir/test_buffer.vim')
-rw-r--r--src/testdir/test_buffer.vim7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/testdir/test_buffer.vim b/src/testdir/test_buffer.vim
index fc391dccee..aea3995587 100644
--- a/src/testdir/test_buffer.vim
+++ b/src/testdir/test_buffer.vim
@@ -410,6 +410,13 @@ 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
+
" Test for the 'maxmem' and 'maxmemtot' options
func Test_buffer_maxmem()
" use 1KB per buffer and 2KB for all the buffers