0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.0189: cd() with NULL argument crashes

Problem:    cd() with NULL argument crashes.
Solution:   Check for NULL. (Ken Takata, closes #5558)
This commit is contained in:
Bram Moolenaar
2020-01-31 22:41:38 +01:00
parent 7f829cab35
commit 7cc96923c4
3 changed files with 5 additions and 1 deletions

View File

@@ -6572,7 +6572,7 @@ changedir_func(
int dir_differs;
int retval = FALSE;
if (allbuf_locked())
if (new_dir == NULL || allbuf_locked())
return FALSE;
if (vim_strchr(p_cpo, CPO_CHDIR) != NULL && curbufIsChanged() && !forceit)