patch 9.1.0700: crash with 2byte encoding and glob2regpat()
Problem: possible crash with 2byte encoding and glob2regpat()
Solution: Skip over character, if it is multi-byte character
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/testdir/crash/heap_overflow_glob2regpat b/src/testdir/crash/heap_overflow_glob2regpat
new file mode 100644
index 0000000..8baf6f3
--- /dev/null
+++ b/src/testdir/crash/heap_overflow_glob2regpat
Binary files differ
diff --git a/src/testdir/test_crash.vim b/src/testdir/test_crash.vim
index b334876..e741a18 100644
--- a/src/testdir/test_crash.vim
+++ b/src/testdir/test_crash.vim
@@ -222,6 +222,12 @@
call term_sendkeys(buf, args)
call TermWait(buf, 150)
+ let file = 'crash/heap_overflow_glob2regpat'
+ let cmn_args = "%s -u NONE -i NONE -n -X -m -n -e -s -S %s -c ':qa!'"
+ let args = printf(cmn_args, vim, file)
+ call term_sendkeys(buf, args)
+ call TermWait(buf, 50)
+
" clean up
exe buf .. "bw!"