forked from aniani/vim
patch 9.1.1204: MS-Windows: crash when passing long string to expand()
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: #16896
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
96395e1512
commit
00a749bd90
@@ -141,4 +141,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
|
||||
|
||||
Reference in New Issue
Block a user