diff options
| author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-07-20 17:22:17 -0400 |
|---|---|---|
| committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-07-20 17:28:45 -0400 |
| commit | 526dbcafd1cd3eae24e7c615aadef3555b6791aa (patch) | |
| tree | e64ae87de187e1d5bb51500092b75de0b521d33f /src/nvim/testdir | |
| parent | d20bbc802245cc14176028bf209ae3a7e81e21c4 (diff) | |
| download | rneovim-526dbcafd1cd3eae24e7c615aadef3555b6791aa.tar.gz rneovim-526dbcafd1cd3eae24e7c615aadef3555b6791aa.tar.bz2 rneovim-526dbcafd1cd3eae24e7c615aadef3555b6791aa.zip | |
vim-patch:8.1.1720: crash with very long %[] pattern
Problem: Crash with very long %[] pattern. (Reza Mirzazade farkhani)
Solution: Check for reg_toolong. (closes vim/vim#4703)
https://github.com/vim/vim/commit/2a5b52758bb327b89d22660cc28c157ec29782e5
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_regexp_utf8.vim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_regexp_utf8.vim b/src/nvim/testdir/test_regexp_utf8.vim index 97638e9aac..e06c7d6368 100644 --- a/src/nvim/testdir/test_regexp_utf8.vim +++ b/src/nvim/testdir/test_regexp_utf8.vim @@ -183,3 +183,12 @@ func Test_large_class() call assert_equal(1, "\u3042" =~# '[\u3000-\u4000]') set re=0 endfunc + +func Test_optmatch_toolong() + set re=1 + " Can only handle about 8000 characters. + let pat = '\\%[' .. repeat('x', 9000) .. ']' + call assert_fails('call match("abc def", "' .. pat .. '")', 'E339:') + set re=0 +endfunc + |