mirror of
https://github.com/neovim/neovim.git
synced 2025-09-14 07:18:17 +00:00
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)
48f377a476
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user