aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-11-17 09:42:10 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-11-17 09:59:22 +0800
commitb6200fbdf2035b09abfc0f94fba9c432bc0b9245 (patch)
tree9e525549dfaf45d82cd0ef621d1d9ea125aa2187
parent3ab0e296c674a6846512df24a0a70199bba8c59a (diff)
downloadrneovim-b6200fbdf2035b09abfc0f94fba9c432bc0b9245.tar.gz
rneovim-b6200fbdf2035b09abfc0f94fba9c432bc0b9245.tar.bz2
rneovim-b6200fbdf2035b09abfc0f94fba9c432bc0b9245.zip
vim-patch:9.0.1992: [security] segfault in exmode
Problem: segfault in exmode when redrawing Solution: skip gui_scroll when exmode_active https://github.com/vim/vim/commit/20d161ace307e28690229b68584f2d84556f8960 Co-authored-by: Christian Brabandt <cb@256bit.org>
-rw-r--r--test/old/testdir/crash/crash_scrollbar2
-rw-r--r--test/old/testdir/test_crash.vim7
2 files changed, 9 insertions, 0 deletions
diff --git a/test/old/testdir/crash/crash_scrollbar b/test/old/testdir/crash/crash_scrollbar
new file mode 100644
index 0000000000..1de5905228
--- /dev/null
+++ b/test/old/testdir/crash/crash_scrollbar
@@ -0,0 +1,2 @@
+" this goes to insert mode and presses key k_VerScrollbar which may cause a redraw in exmode, which used ot crash Vim
+norm o€ùX
diff --git a/test/old/testdir/test_crash.vim b/test/old/testdir/test_crash.vim
index 5c83e3a2f5..9a80340c28 100644
--- a/test/old/testdir/test_crash.vim
+++ b/test/old/testdir/test_crash.vim
@@ -72,6 +72,12 @@ func Test_crash1()
\ ' || echo "crash 8: [OK]" >> X_crash1_result.txt' .. "\<cr>")
call TermWait(buf, 3000)
+ let file = 'crash/crash_scrollbar'
+ let args = printf(cmn_args, vim, file)
+ call term_sendkeys(buf, args ..
+ \ ' && echo "crash 9: [OK]" >> X_crash1_result.txt' .. "\<cr>")
+ call TermWait(buf, 1000)
+
" clean up
exe buf .. "bw!"
@@ -86,6 +92,7 @@ func Test_crash1()
\ 'crash 6: [OK]',
\ 'crash 7: [OK]',
\ 'crash 8: [OK]',
+ \ 'crash 9: [OK]',
\ ]
call assert_equal(expected, getline(1, '$'))