summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.1046
diff options
context:
space:
mode:
Diffstat (limited to 'data/vim/patches/8.1.1046')
-rw-r--r--data/vim/patches/8.1.104681
1 files changed, 81 insertions, 0 deletions
diff --git a/data/vim/patches/8.1.1046 b/data/vim/patches/8.1.1046
new file mode 100644
index 000000000..85a705659
--- /dev/null
+++ b/data/vim/patches/8.1.1046
@@ -0,0 +1,81 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.1046
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+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 -- Bram@Moolenaar.net -- 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 ///