summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-11-20 13:32:36 +0100
committerBram Moolenaar <Bram@vim.org>2018-11-20 13:32:36 +0100
commit82e8c92ebef5afcac0c0fdb706ff163f9b3366f7 (patch)
tree4511c874a4c354ea71145da55c9c9298750c4199
parent5958f95a40a4a44bd9e7f3b7ec6554a6ef3e42ca (diff)
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)
-rw-r--r--runtime/doc/options.txt2
-rw-r--r--src/buffer.c4
-rw-r--r--src/option.c9
-rw-r--r--src/version.c2
4 files changed, 11 insertions, 6 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index e57de8f174..8a106e16ff 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -7339,7 +7339,7 @@ A jump table for the options with a short description can be found at |Q_op|.
After this option has been set successfully, Vim will source the files
"spell/LANG.vim" in 'runtimepath'. "LANG" is the value of 'spelllang'
- up to the first comma, dot or underscore.
+ up to the first character that is not an ASCII letter and not a dash.
Also see |set-spc-auto|.
diff --git a/src/buffer.c b/src/buffer.c
index ee962b2e8f..8235a4fcaa 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 a4a9c9711d..e6d46aadf4 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 856941742e..a6f155f651 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,