Patch 8.1.1046
Problem: the "secure" variable is used inconsistently. (Justin M. Keyes)
Solution: Set it to one instead of incrementing.
Files: src/buffer.c, src/option.c
*** ../vim-8.1.1045/src/buffer.c 2019-03-02 10:13:36.788974890 +0100
--- src/buffer.c 2019-03-24 13:48:30.222662964 +0100
***************
*** 5498,5504 ****
current_sctx.sc_lnum = 0;
#endif
// Make sure no risky things are executed as a side effect.
! ++secure;
retval = do_set(s, OPT_MODELINE | OPT_LOCAL | flags);
--- 5498,5504 ----
current_sctx.sc_lnum = 0;
#endif
// Make sure no risky things are executed as a side effect.
! secure = 1;
retval = do_set(s, OPT_MODELINE | OPT_LOCAL | flags);
*** ../vim-8.1.1045/src/option.c 2019-03-21 21:45:30.879282125 +0100
--- src/option.c 2019-03-24 13:50:57.149725126 +0100
***************
*** 5151,5163 ****
// effects in secure mode. Also when the value was
// set with the P_INSECURE flag and is not
// completely replaced.
! if (secure
#ifdef HAVE_SANDBOX
! || sandbox != 0
#endif
! || (opt_flags & OPT_MODELINE)
! || (!value_is_replaced && (*p &
P_INSECURE)))
! ++secure;
// Handle side effects, and set the global value
// for ":set" on local options. Note: when setting
--- 5151,5162 ----
// effects in secure mode. Also when the value was
// set with the P_INSECURE flag and is not
// completely replaced.
! if ((opt_flags & OPT_MODELINE)
#ifdef HAVE_SANDBOX
! || sandbox != 0
#endif
! || (!value_is_replaced && (*p & P_INSECURE)))
! secure = 1;
// Handle side effects, and set the global value
// for ":set" on local options. Note: when setting
*** ../vim-8.1.1045/src/version.c 2019-03-23 17:41:56.217138373 +0100
--- src/version.c 2019-03-24 13:53:30.596743493 +0100
***************
*** 777,778 ****
--- 777,780 ----
{ /* Add new patch number below this line */
+ /**/
+ 1046,
/**/
--
In a world without walls and borders, who needs windows and gates?
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.