diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-09-18 21:51:47 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-09-18 21:51:47 +0200 |
commit | e961cba3cb8281c47f1dc2c2bc031b07504f17d4 (patch) | |
tree | a736f9affa9157f9ec3070a8d663b236f3fed54d /src/testdir/test_arglist.vim | |
parent | cc3a997746d97980374fcc9094651a5f82a6c63d (diff) | |
download | vim-git-e961cba3cb8281c47f1dc2c2bc031b07504f17d4.tar.gz |
patch 8.1.0404: accessing invalid memory with long argument namev8.1.0404
Problem: Accessing invalid memory with long argument name.
Solution: Use item_count instead of checking for a terminating NULL.
(Dominique Pelle, closes #3444)
Diffstat (limited to 'src/testdir/test_arglist.vim')
-rw-r--r-- | src/testdir/test_arglist.vim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/testdir/test_arglist.vim b/src/testdir/test_arglist.vim index a6c71c9f5..c558aab7d 100644 --- a/src/testdir/test_arglist.vim +++ b/src/testdir/test_arglist.vim @@ -411,3 +411,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 |