aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-05-05 11:23:25 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-05-05 11:38:21 -0400
commit9c6476d81e47f886e448579261192db6c9a92135 (patch)
tree51fc4064891da020424a6486f218575cfd1f3158 /src/nvim/buffer.c
parent0673b0d25148d666c1865aa24ff8c2f834faf29e (diff)
downloadrneovim-9c6476d81e47f886e448579261192db6c9a92135.tar.gz
rneovim-9c6476d81e47f886e448579261192db6c9a92135.tar.bz2
rneovim-9c6476d81e47f886e448579261192db6c9a92135.zip
vim-patch:8.1.0613: when executing an insecure function the secure flag is stuck
Problem: When executing an insecure function the secure flag is stuck. (Gabriel Barta) Solution: Restore "secure" instead of decrementing it. (closes vim/vim#3705) https://github.com/vim/vim/commit/48f377a476e4a3312aa0e3535aba170484b59483
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r--src/nvim/buffer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index c8ed7d0b37..d12ba14911 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -5112,6 +5112,7 @@ chk_modeline(
*e = NUL; // truncate the set command
if (*s != NUL) { // skip over an empty "::"
+ const int secure_save = secure;
save_SID = current_SID;
current_SID = SID_MODELINE;
// Make sure no risky things are executed as a side effect.
@@ -5119,7 +5120,7 @@ chk_modeline(
retval = do_set(s, OPT_MODELINE | OPT_LOCAL | flags);
- secure--;
+ secure = secure_save;
current_SID = save_SID;
if (retval == FAIL) { // stop if error found
break;