summaryrefslogtreecommitdiffstatshomepage
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2025-03-15 17:34:56 +0800
committergithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2025-03-15 11:21:12 +0000
commit0c995c0efba092f149fc314a43327db7d105e1ad (patch)
tree586155db933c577b347a8d2e1eed2b4878804dd1 /test
parentaab7129abe39d3433facb9994998bede3a4299e1 (diff)
vim-patch:9.1.1204: MS-Windows: crash when passing long string to expand() (#32902)release-0.10
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 (cherry picked from commit ec8fc2874344c7e25f8cbb6894cde526164ea756)
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_expand_func.vim7
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 454d76f0aa..b3c2326975 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