mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.1.1046: the "secure" variable is used inconsistently
Problem: the "secure" variable is used inconsistently. (Justin M. Keyes) Solution: Set it to one instead of incrementing.
This commit is contained in:
parent
63dbfd33c1
commit
82b033eff8
@ -5498,7 +5498,7 @@ chk_modeline(
|
||||
current_sctx.sc_lnum = 0;
|
||||
#endif
|
||||
// Make sure no risky things are executed as a side effect.
|
||||
++secure;
|
||||
secure = 1;
|
||||
|
||||
retval = do_set(s, OPT_MODELINE | OPT_LOCAL | flags);
|
||||
|
||||
|
@ -5151,13 +5151,12 @@ do_set(
|
||||
// effects in secure mode. Also when the value was
|
||||
// set with the P_INSECURE flag and is not
|
||||
// completely replaced.
|
||||
if (secure
|
||||
if ((opt_flags & OPT_MODELINE)
|
||||
#ifdef HAVE_SANDBOX
|
||||
|| sandbox != 0
|
||||
|| sandbox != 0
|
||||
#endif
|
||||
|| (opt_flags & OPT_MODELINE)
|
||||
|| (!value_is_replaced && (*p & P_INSECURE)))
|
||||
++secure;
|
||||
|| (!value_is_replaced && (*p & P_INSECURE)))
|
||||
secure = 1;
|
||||
|
||||
// Handle side effects, and set the global value
|
||||
// for ":set" on local options. Note: when setting
|
||||
|
@ -775,6 +775,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1046,
|
||||
/**/
|
||||
1045,
|
||||
/**/
|
||||
|
Loading…
x
Reference in New Issue
Block a user