mirror of
https://github.com/neovim/neovim.git
synced 2025-09-14 23:38:17 +00:00
vim-patch:8.2.3611: crash when using CTRL-W f without finding a file name
Problem: Crash when using CTRL-W f without finding a file name.
Solution: Bail out when the file name length is zero.
615ddd5342
This commit is contained in:
@@ -1682,6 +1682,10 @@ char_u *find_file_name_in_path(char_u *ptr, size_t len, int options, long count,
|
||||
char_u *file_name;
|
||||
char_u *tofree = NULL;
|
||||
|
||||
if (len == 0) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if ((options & FNAME_INCL) && *curbuf->b_p_inex != NUL) {
|
||||
tofree = (char_u *)eval_includeexpr((char *)ptr, len);
|
||||
if (tofree != NULL) {
|
||||
|
Reference in New Issue
Block a user