diff options
author | zeertzjq <zeertzjq@outlook.com> | 2025-03-15 17:34:56 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-15 09:34:56 +0000 |
commit | ec8fc2874344c7e25f8cbb6894cde526164ea756 (patch) | |
tree | 9c4cd5709f31687bfbca4fe95f2da65acf63d2b3 /test | |
parent | 9ef80352b6e8e18e002d3d2097c8bbd1d168fe40 (diff) | |
download | rneovim-ec8fc2874344c7e25f8cbb6894cde526164ea756.tar.gz rneovim-ec8fc2874344c7e25f8cbb6894cde526164ea756.tar.bz2 rneovim-ec8fc2874344c7e25f8cbb6894cde526164ea756.zip |
vim-patch:9.1.1204: MS-Windows: crash when passing long string to expand() (#32902)
Problem: MS-Windows: crash when passing long string to expand() with
'wildignorecase'.
Solution: Use the same buflen as unix_expandpath() in dos_expandpath().
Remove an unnecessary STRLEN() while at it (zeertzjq).
closes: vim/vim#16896
https://github.com/vim/vim/commit/00a749bd90e6b84e7e5132691d73fe9aa3fdff05
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_expand_func.vim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/old/testdir/test_expand_func.vim b/test/old/testdir/test_expand_func.vim index 12750baf67..281e7c13e2 100644 --- a/test/old/testdir/test_expand_func.vim +++ b/test/old/testdir/test_expand_func.vim @@ -143,4 +143,11 @@ func Test_expand_wildignore() set wildignore& endfunc +" Passing a long string to expand with 'wildignorecase' should not crash Vim. +func Test_expand_long_str() + set wildignorecase + call expand('a'->repeat(99999)) + set wildignorecase& +endfunc + " vim: shiftwidth=2 sts=2 expandtab |