From cbda383efefc78f87f8574a960f4c41a8d8107c9 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 5 May 2019 09:50:34 -0400 Subject: 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 --- src/nvim/testdir/test_arglist.vim | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/nvim/testdir') 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 -- cgit