mirror of
https://github.com/neovim/neovim.git
synced 2025-09-14 23:38:17 +00:00
vim-patch:7.4.903
Problem: MS-Windows: When 'encoding' differs from the current code page,
expandinig wildcards may cause illegal memory access.
Solution: Allocate a longer buffer. (Ken Takata)
7314efd87d
This commit is contained in:
@@ -556,8 +556,9 @@ static size_t do_path_expand(garray_T *gap, const char_u *path,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* make room for file name */
|
||||
buf = xmalloc(STRLEN(path) + BASENAMELEN + 5);
|
||||
// Make room for file name. When doing encoding conversion the actual
|
||||
// length may be quite a bit longer, thus use the maximum possible length.
|
||||
buf = xmalloc(MAXPATHL);
|
||||
|
||||
/*
|
||||
* Find the first part in the path name that contains a wildcard.
|
||||
|
Reference in New Issue
Block a user