diff options
author | KunMing Xie <qqzz014@gmail.com> | 2017-07-29 06:00:53 +0800 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-07-29 00:00:53 +0200 |
commit | 707bb3749459fb30c02701b63553af7a3460f980 (patch) | |
tree | 5add9a29ea124d8012d11b11095faca28a623f84 /src | |
parent | 3b45f676c0f07aa2826f191f555ba0d5f53e6d7c (diff) | |
download | rneovim-707bb3749459fb30c02701b63553af7a3460f980.tar.gz rneovim-707bb3749459fb30c02701b63553af7a3460f980.tar.bz2 rneovim-707bb3749459fb30c02701b63553af7a3460f980.zip |
vim-patch:8.0.0100 (#7085)
vim-patch:8.0.0100
Problem: Options that are a file name may contain non-filename characters.
Solution: Check for more invalid characters.
https://github.com/vim/vim/commit/319afe3804741db5a6c188bd69535fa7ed044c62
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/option.c | 11 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index a6ae022e79..98ca72b2bb 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -2457,12 +2457,11 @@ did_set_string_option ( if ((secure || sandbox != 0) && (options[opt_idx].flags & P_SECURE)) { errmsg = e_secure; - } - /* Check for a "normal" file name in some options. Disallow a path - * separator (slash and/or backslash), wildcards and characters that are - * often illegal in a file name. */ - else if ((options[opt_idx].flags & P_NFNAME) - && vim_strpbrk(*varp, (char_u *)"/\\*?[|<>") != NULL) { + } else if ((options[opt_idx].flags & P_NFNAME) + && vim_strpbrk(*varp, (char_u *)"/\\*?[|;&<>\r\n") != NULL) { + // Check for a "normal" file name in some options. Disallow a path + // separator (slash and/or backslash), wildcards and characters that are + // often illegal in a file name. errmsg = e_invarg; } /* 'backupcopy' */ diff --git a/src/nvim/version.c b/src/nvim/version.c index b585c3ad9a..f0048fb234 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -629,7 +629,7 @@ static const int included_patches[] = { // 103 NA // 102, // 101, - // 100, + 100, 99, // 98 NA // 97 NA |