Mercurial > vim
changeset 15056:a751ecdd07cc v8.1.0539
patch 8.1.0539: cannot build without the sandbox
commit https://github.com/vim/vim/commit/82e8c92ebef5afcac0c0fdb706ff163f9b3366f7
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Nov 20 13:32:36 2018 +0100
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 20 Nov 2018 13:45:08 +0100 |
parents | bf6188c15027 |
children | ce319918d987 |
files | runtime/doc/options.txt src/buffer.c src/option.c src/version.c |
diffstat | 4 files changed, 11 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -7339,7 +7339,7 @@ A jump table for the options with a shor 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|.
--- 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
--- 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 }