From 15bbd6ec871a0efdd16256e1fccbaac0fd374cbd Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 13 Feb 2019 20:31:50 +0100 Subject: patch 8.1.0910: crash with tricky search pattern Problem: Crash with tricky search pattern. (Kuang-che Wu) Solution: Check for runnning out of memory. (closes #3950) --- src/testdir/test_regexp_latin.vim | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/testdir/test_regexp_latin.vim') diff --git a/src/testdir/test_regexp_latin.vim b/src/testdir/test_regexp_latin.vim index 415a2764f..bcac6c72c 100644 --- a/src/testdir/test_regexp_latin.vim +++ b/src/testdir/test_regexp_latin.vim @@ -90,3 +90,10 @@ func Test_recursive_addstate() let lnum = search('\v((){328}){389}') call assert_equal(0, lnum) endfunc + +func Test_out_of_memory() + new + s/^/,n + " This will be slow... + call assert_fails('call search("\\v((n||<)+);")', 'E363:') +endfunc -- cgit v1.2.1