mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 11:15:14 -07:00
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.
319afe3804
This commit is contained in:
parent
3b45f676c0
commit
707bb37494
@ -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' */
|
||||
|
@ -629,7 +629,7 @@ static const int included_patches[] = {
|
||||
// 103 NA
|
||||
// 102,
|
||||
// 101,
|
||||
// 100,
|
||||
100,
|
||||
99,
|
||||
// 98 NA
|
||||
// 97 NA
|
||||
|
Loading…
Reference in New Issue
Block a user