aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-03-24 12:55:41 +0100
committerGitHub <noreply@github.com>2019-03-24 12:55:41 +0100
commitf705ed22fd9ae8a0477779f822bd99dfb010ea4b (patch)
treed29d3bd48a02fc62f4516a2d0b65484c54efc28f /src/nvim/buffer.c
parent0920c6ca812d673628cf6d04d68af50cddccbd3e (diff)
parenta73e0e8e773003eff41795cd6dac2c1213e2eaf8 (diff)
downloadrneovim-f705ed22fd9ae8a0477779f822bd99dfb010ea4b.tar.gz
rneovim-f705ed22fd9ae8a0477779f822bd99dfb010ea4b.tar.bz2
rneovim-f705ed22fd9ae8a0477779f822bd99dfb010ea4b.zip
Merge #9776 from janlazo/vim-8.1.0177
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r--src/nvim/buffer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index e333f552a8..d67783baa0 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -4943,7 +4943,12 @@ chk_modeline (
if (*s != NUL) { /* skip over an empty "::" */
save_SID = current_SID;
current_SID = SID_MODELINE;
+ // Make sure no risky things are executed as a side effect.
+ sandbox++;
+
retval = do_set(s, OPT_MODELINE | OPT_LOCAL | flags);
+
+ sandbox--;
current_SID = save_SID;
if (retval == FAIL) /* stop if error found */
break;