0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.1.0539: cannot build without the sandbox

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)
This commit is contained in:
Bram Moolenaar
2018-11-20 13:32:36 +01:00
parent 5958f95a40
commit 82e8c92ebe
4 changed files with 11 additions and 6 deletions

View File

@@ -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 After this option has been set successfully, Vim will source the files
"spell/LANG.vim" in 'runtimepath'. "LANG" is the value of 'spelllang' "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|. Also see |set-spc-auto|.

View File

@@ -5523,11 +5523,11 @@ chk_modeline(
current_sctx.sc_lnum = 0; current_sctx.sc_lnum = 0;
#endif #endif
// Make sure no risky things are executed as a side effect. // Make sure no risky things are executed as a side effect.
++sandbox; ++secure;
retval = do_set(s, OPT_MODELINE | OPT_LOCAL | flags); retval = do_set(s, OPT_MODELINE | OPT_LOCAL | flags);
--sandbox; --secure;
#ifdef FEAT_EVAL #ifdef FEAT_EVAL
current_sctx = save_current_sctx; current_sctx = save_current_sctx;
#endif #endif

View File

@@ -7758,10 +7758,13 @@ did_set_string_option(
* '.encoding'. * '.encoding'.
*/ */
for (p = q; *p != NUL; ++p) for (p = q; *p != NUL; ++p)
if (vim_strchr((char_u *)"_.,", *p) != NULL) if (!ASCII_ISALPHA(*p) && *p != '-')
break; break;
vim_snprintf((char *)fname, 200, "spell/%.*s.vim", (int)(p - q), q); if (p > q)
source_runtime(fname, DIP_ALL); {
vim_snprintf((char *)fname, 200, "spell/%.*s.vim", (int)(p - q), q);
source_runtime(fname, DIP_ALL);
}
} }
#endif #endif
} }

View File

@@ -792,6 +792,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
539,
/**/ /**/
538, 538,
/**/ /**/