diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-10-13 19:08:24 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-10-13 19:08:24 +0200 |
commit | 21cbe175eece17fad21d7403b00422445b587138 (patch) | |
tree | f266f1ec7f373d0f8c975075eb50cb0805ff9960 /src/ex_cmds.c | |
parent | 2b9b17ea5daaaa693d0891e9a999d711f0e0f743 (diff) | |
download | vim-git-21cbe175eece17fad21d7403b00422445b587138.tar.gz |
patch 8.2.1842: crash when USE_FNAME_CASE is defined and using :browsev8.2.1842
Problem: Crash when USE_FNAME_CASE is defined and using :browse.
Solution: Don't use read-only memory for ".". (Yegappan Lakshmanan,
closes #7123)
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index a55fae709..6371eceba 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -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 { |