mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06: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)
|
if ((secure || sandbox != 0)
|
||||||
&& (options[opt_idx].flags & P_SECURE)) {
|
&& (options[opt_idx].flags & P_SECURE)) {
|
||||||
errmsg = e_secure;
|
errmsg = e_secure;
|
||||||
}
|
} else if ((options[opt_idx].flags & P_NFNAME)
|
||||||
/* Check for a "normal" file name in some options. Disallow a path
|
&& vim_strpbrk(*varp, (char_u *)"/\\*?[|;&<>\r\n") != NULL) {
|
||||||
* separator (slash and/or backslash), wildcards and characters that are
|
// Check for a "normal" file name in some options. Disallow a path
|
||||||
* often illegal in a file name. */
|
// separator (slash and/or backslash), wildcards and characters that are
|
||||||
else if ((options[opt_idx].flags & P_NFNAME)
|
// often illegal in a file name.
|
||||||
&& vim_strpbrk(*varp, (char_u *)"/\\*?[|<>") != NULL) {
|
|
||||||
errmsg = e_invarg;
|
errmsg = e_invarg;
|
||||||
}
|
}
|
||||||
/* 'backupcopy' */
|
/* 'backupcopy' */
|
||||||
|
@ -629,7 +629,7 @@ static const int included_patches[] = {
|
|||||||
// 103 NA
|
// 103 NA
|
||||||
// 102,
|
// 102,
|
||||||
// 101,
|
// 101,
|
||||||
// 100,
|
100,
|
||||||
99,
|
99,
|
||||||
// 98 NA
|
// 98 NA
|
||||||
// 97 NA
|
// 97 NA
|
||||||
|
Loading…
Reference in New Issue
Block a user