aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/fileio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index 6782465ef1..0fce7fe2c8 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -5296,6 +5296,9 @@ static void vim_mktempdir(void)
char user[40] = { 0 };
(void)os_get_username(user, sizeof(user));
+ // Usernames may contain slashes! #19240
+ memchrsub(user, '/', '_', sizeof(user));
+ memchrsub(user, '\\', '_', sizeof(user));
// Make sure the umask doesn't remove the executable bit.
// "repl" has been reported to use "0177".