aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-05-05 09:50:34 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-07-26 05:19:05 -0400
commitcbda383efefc78f87f8574a960f4c41a8d8107c9 (patch)
treea8a1f4ed618cd846cfd293c29c4494c5fb6284f0 /src/nvim/testdir
parent8a9c9a996322a1d111c55efb156710add68da358 (diff)
downloadrneovim-cbda383efefc78f87f8574a960f4c41a8d8107c9.tar.gz
rneovim-cbda383efefc78f87f8574a960f4c41a8d8107c9.tar.bz2
rneovim-cbda383efefc78f87f8574a960f4c41a8d8107c9.zip
vim-patch:8.1.0404: accessing invalid memory with long argument name
Problem: Accessing invalid memory with long argument name. Solution: Use item_count instead of checking for a terminating NULL. (Dominique Pelle, closes vim/vim#3444) https://github.com/vim/vim/commit/e961cba3cb8281c47f1dc2c2bc031b07504f17d4
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_arglist.vim7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_arglist.vim b/src/nvim/testdir/test_arglist.vim
index 3efef60f8e..7d5511f587 100644
--- a/src/nvim/testdir/test_arglist.vim
+++ b/src/nvim/testdir/test_arglist.vim
@@ -452,3 +452,10 @@ func Test_arg_all_expand()
call assert_equal('notexist Xx\ x runtest.vim', expand('##'))
call delete('Xx x')
endfunc
+
+func Test_large_arg()
+ " Argument longer or equal to the number of columns used to cause
+ " access to invalid memory.
+ exe 'argadd ' .repeat('x', &columns)
+ args
+endfunc