diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-12-02 12:37:37 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-12-02 12:37:37 +0100 |
commit | 1cbfc9914db1cb06aaa092fa42eb7a2fc3dc7ad7 (patch) | |
tree | 2d006290346b32cd411080d3087a84d8a49e08b6 /src/testdir/test_utf8.vim | |
parent | a452b808b4da2d272ca4a50865eb8ca89a58f239 (diff) | |
download | vim-git-1cbfc9914db1cb06aaa092fa42eb7a2fc3dc7ad7.tar.gz |
patch 8.2.2078: illegal memory access when using :print on invalid textv8.2.2078
Problem: Illegal memory access when using :print on invalid text. (Dhiraj
Mishra)
Solution: Check for more composing characters than supported. (closes #7399)
Diffstat (limited to 'src/testdir/test_utf8.vim')
-rw-r--r-- | src/testdir/test_utf8.vim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/testdir/test_utf8.vim b/src/testdir/test_utf8.vim index bfb90c108..a5fd4fb89 100644 --- a/src/testdir/test_utf8.vim +++ b/src/testdir/test_utf8.vim @@ -180,4 +180,13 @@ func Test_setcellwidths() call assert_fails('call setcellwidths([[0x33, 0x44, 2]])', 'E1114:') endfunc +func Test_print_overlong() + " Text with more composing characters than MB_MAXBYTES. + new + call setline(1, 'axxxxxxxxxxxxxxxxxxxxxxxxxxxxxx') + s/x/\=nr2char(1629)/g + print + bwipe! +endfunc + " vim: shiftwidth=2 sts=2 expandtab |