1
0
forked from aniani/vim

patch 8.1.0485: term_start() does not check if directory is accessible

Problem:    term_start() does not check if directory is accessible.
Solution:   Add mch_access() call. (Jason Franklin)
This commit is contained in:
Bram Moolenaar
2018-10-19 16:53:39 +02:00
parent 38654503b0
commit 839e81e12d
3 changed files with 26 additions and 1 deletions

View File

@@ -4916,7 +4916,8 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2)
if (!(supported2 & JO2_CWD))
break;
opt->jo_cwd = get_tv_string_buf_chk(item, opt->jo_cwd_buf);
if (opt->jo_cwd == NULL || !mch_isdir(opt->jo_cwd))
if (opt->jo_cwd == NULL || !mch_isdir(opt->jo_cwd)
|| mch_access((char *)opt->jo_cwd, X_OK) != 0)
{
EMSG2(_(e_invargval), "cwd");
return FAIL;