diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-11-20 13:32:36 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-11-20 13:32:36 +0100 |
commit | 82e8c92ebef5afcac0c0fdb706ff163f9b3366f7 (patch) | |
tree | 4511c874a4c354ea71145da55c9c9298750c4199 /src | |
parent | 5958f95a40a4a44bd9e7f3b7ec6554a6ef3e42ca (diff) | |
download | vim-git-82e8c92ebef5afcac0c0fdb706ff163f9b3366f7.tar.gz |
patch 8.1.0539: cannot build without the sandboxv8.1.0539
Problem: Cannot build without the sandbox.
Solution: Set the secure option instead of using the sandbox. Also restrict
the characters from 'spelllang' that are used for LANG.vim.
(suggested by Yasuhiro Matsumoto)
Diffstat (limited to 'src')
-rw-r--r-- | src/buffer.c | 4 | ||||
-rw-r--r-- | src/option.c | 9 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 10 insertions, 5 deletions
diff --git a/src/buffer.c b/src/buffer.c index ee962b2e8..8235a4fca 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5523,11 +5523,11 @@ chk_modeline( current_sctx.sc_lnum = 0; #endif // Make sure no risky things are executed as a side effect. - ++sandbox; + ++secure; retval = do_set(s, OPT_MODELINE | OPT_LOCAL | flags); - --sandbox; + --secure; #ifdef FEAT_EVAL current_sctx = save_current_sctx; #endif diff --git a/src/option.c b/src/option.c index a4a9c9711..e6d46aadf 100644 --- a/src/option.c +++ b/src/option.c @@ -7758,10 +7758,13 @@ did_set_string_option( * '.encoding'. */ for (p = q; *p != NUL; ++p) - if (vim_strchr((char_u *)"_.,", *p) != NULL) + if (!ASCII_ISALPHA(*p) && *p != '-') break; - vim_snprintf((char *)fname, 200, "spell/%.*s.vim", (int)(p - q), q); - source_runtime(fname, DIP_ALL); + if (p > q) + { + vim_snprintf((char *)fname, 200, "spell/%.*s.vim", (int)(p - q), q); + source_runtime(fname, DIP_ALL); + } } #endif } diff --git a/src/version.c b/src/version.c index 856941742..a6f155f65 100644 --- a/src/version.c +++ b/src/version.c @@ -793,6 +793,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 539, +/**/ 538, /**/ 537, |