0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.1842: crash when USE_FNAME_CASE is defined and using :browse

Problem:    Crash when USE_FNAME_CASE is defined and using :browse.
Solution:   Don't use read-only memory for ".". (Yegappan Lakshmanan,
            closes #7123)
This commit is contained in:
Bram Moolenaar
2020-10-13 19:08:24 +02:00
parent 2b9b17ea5d
commit 21cbe175ee
4 changed files with 24 additions and 2 deletions

View File

@@ -2465,6 +2465,7 @@ do_ecmd(
bufref_T old_curbuf;
char_u *free_fname = NULL;
#ifdef FEAT_BROWSE
char_u dot_path[] = ".";
char_u *browse_file = NULL;
#endif
int retval = FAIL;
@@ -2511,7 +2512,7 @@ do_ecmd(
// No browsing supported but we do have the file explorer:
// Edit the directory.
if (ffname == NULL || !mch_isdir(ffname))
ffname = (char_u *)".";
ffname = dot_path;
}
else
{