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:
@@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user