mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 17:06:30 +00:00
vim-patch:9.1.1690: Missing recursion guard in dos/unix_expandpath() (#35499)
Problem: Missing recursion guard in dos/unix_expandpath()
Solution: Add guard variables (ashamedbit)
fixes: vim/vim#18099
closes: vim/vim#18106
e8948a1f80
Co-authored-by: ashamedbit <muralianiruddhan@gmail.com>
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
This commit is contained in:
@@ -754,9 +754,13 @@ static size_t do_path_expand(garray_T *gap, const char *path, size_t wildoff, in
|
||||
|
||||
vim_snprintf(buf + len, buflen - len, "%s", path_end);
|
||||
if (path_has_exp_wildcard(path_end)) { // handle more wildcards
|
||||
// need to expand another component of the path
|
||||
// remove backslashes for the remaining components only
|
||||
do_path_expand(gap, buf, len + 1, flags, false);
|
||||
if (stardepth < 100) {
|
||||
stardepth++;
|
||||
// need to expand another component of the path
|
||||
// remove backslashes for the remaining components only
|
||||
do_path_expand(gap, buf, len + 1, flags, false);
|
||||
stardepth--;
|
||||
}
|
||||
} else {
|
||||
FileInfo file_info;
|
||||
|
||||
|
Reference in New Issue
Block a user