summaryrefslogtreecommitdiffstats
path: root/debian/patches/patch-8.1.1366-using-expressions-in-a-modeline-is-unsafe.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/patch-8.1.1366-using-expressions-in-a-modeline-is-unsafe.patch')
-rw-r--r--debian/patches/patch-8.1.1366-using-expressions-in-a-modeline-is-unsafe.patch72
1 files changed, 30 insertions, 42 deletions
diff --git a/debian/patches/patch-8.1.1366-using-expressions-in-a-modeline-is-unsafe.patch b/debian/patches/patch-8.1.1366-using-expressions-in-a-modeline-is-unsafe.patch
index 6918fc7..eb32b06 100644
--- a/debian/patches/patch-8.1.1366-using-expressions-in-a-modeline-is-unsafe.patch
+++ b/debian/patches/patch-8.1.1366-using-expressions-in-a-modeline-is-unsafe.patch
@@ -18,8 +18,6 @@ Signed-off-by: James McCoy <jamessan@debian.org>
src/version.c | 2 +
6 files changed, 169 insertions(+), 33 deletions(-)
-diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
-index c269fea..7b25f20 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
@@ -28,7 +26,7 @@ index c269fea..7b25f20 100644
VIM REFERENCE MANUAL by Bram Moolenaar
-@@ -588,14 +588,17 @@ backslash in front of the ':' will be removed. Example:
+@@ -588,14 +588,17 @@ backslash in front of the ':' will be re
/* vi:set dir=c\:\tmp: */ ~
This sets the 'dir' option to "c:\tmp". Only a single backslash before the
':' is removed. Thus to include "\:" you have to specify "\\:".
@@ -52,7 +50,7 @@ index c269fea..7b25f20 100644
Hint: If you would like to do something else than setting an option, you could
define an autocommand that checks the file for a specific string. For
-@@ -1189,6 +1192,7 @@ A jump table for the options with a short description can be found at |Q_op|.
+@@ -1189,6 +1192,7 @@ A jump table for the options with a shor
The expression will be evaluated in the |sandbox| when set from a
modeline, see |sandbox-option|.
@@ -60,7 +58,7 @@ index c269fea..7b25f20 100644
It is not allowed to change text or jump to another window while
evaluating 'balloonexpr' |textlock|.
-@@ -3354,7 +3358,7 @@ A jump table for the options with a short description can be found at |Q_op|.
+@@ -3354,7 +3358,7 @@ A jump table for the options with a shor
The expression will be evaluated in the |sandbox| if set from a
modeline, see |sandbox-option|.
This option can't be set from a |modeline| when the 'diff' option is
@@ -69,7 +67,7 @@ index c269fea..7b25f20 100644
It is not allowed to change text or jump to another window while
evaluating 'foldexpr' |textlock|.
-@@ -3496,6 +3500,7 @@ A jump table for the options with a short description can be found at |Q_op|.
+@@ -3496,6 +3500,7 @@ A jump table for the options with a shor
The expression will be evaluated in the |sandbox| if set from a
modeline, see |sandbox-option|.
@@ -77,7 +75,7 @@ index c269fea..7b25f20 100644
It is not allowed to change text or jump to another window while
evaluating 'foldtext' |textlock|.
-@@ -3534,6 +3539,7 @@ A jump table for the options with a short description can be found at |Q_op|.
+@@ -3534,6 +3539,7 @@ A jump table for the options with a shor
The expression will be evaluated in the |sandbox| when set from a
modeline, see |sandbox-option|. That stops the option from working,
since changing the buffer text is not allowed.
@@ -85,7 +83,7 @@ index c269fea..7b25f20 100644
NOTE: This option is set to "" when 'compatible' is set.
*'formatoptions'* *'fo'*
-@@ -3594,6 +3600,8 @@ A jump table for the options with a short description can be found at |Q_op|.
+@@ -3594,6 +3600,8 @@ A jump table for the options with a shor
Also see 'swapsync' for controlling fsync() on swap files.
'fsync' also applies to |writefile()|, unless a flag is used to
overrule it.
@@ -94,7 +92,7 @@ index c269fea..7b25f20 100644
*'gdefault'* *'gd'* *'nogdefault'* *'nogd'*
'gdefault' 'gd' boolean (default off)
-@@ -3888,7 +3896,7 @@ A jump table for the options with a short description can be found at |Q_op|.
+@@ -3888,7 +3896,7 @@ A jump table for the options with a shor
*'guiheadroom'* *'ghr'*
'guiheadroom' 'ghr' number (default 50)
global
@@ -103,7 +101,7 @@ index c269fea..7b25f20 100644
The number of pixels subtracted from the screen height when fitting
the GUI window on the screen. Set this before the GUI is started,
e.g., in your |gvimrc| file. When zero, the whole screen height will
-@@ -4049,6 +4057,7 @@ A jump table for the options with a short description can be found at |Q_op|.
+@@ -4049,6 +4057,7 @@ A jump table for the options with a shor
'guitabtooltip' is used for the tooltip, see below.
The expression will be evaluated in the |sandbox| when set from a
modeline, see |sandbox-option|.
@@ -111,7 +109,7 @@ index c269fea..7b25f20 100644
Only used when the GUI tab pages line is displayed. 'e' must be
present in 'guioptions'. For the non-GUI tab pages line 'tabline' is
-@@ -4311,6 +4320,7 @@ A jump table for the options with a short description can be found at |Q_op|.
+@@ -4311,6 +4320,7 @@ A jump table for the options with a shor
When this option contains printf-style '%' items, they will be
expanded according to the rules used for 'statusline'. See
'titlestring' for example settings.
@@ -119,7 +117,7 @@ index c269fea..7b25f20 100644
{not available when compiled without the |+statusline| feature}
*'ignorecase'* *'ic'* *'noignorecase'* *'noic'*
-@@ -4331,6 +4341,8 @@ A jump table for the options with a short description can be found at |Q_op|.
+@@ -4331,6 +4341,8 @@ A jump table for the options with a shor
This option specifies a function that will be called to
activate or deactivate the Input Method.
It is not used in the GUI.
@@ -128,7 +126,7 @@ index c269fea..7b25f20 100644
Example: >
function ImActivateFunc(active)
-@@ -4459,6 +4471,8 @@ A jump table for the options with a short description can be found at |Q_op|.
+@@ -4459,6 +4471,8 @@ A jump table for the options with a shor
set imstatusfunc=ImStatusFunc
<
NOTE: This function is invoked very often. Keep it fast.
@@ -137,7 +135,7 @@ index c269fea..7b25f20 100644
*'imstyle'* *'imst'*
'imstyle' 'imst' number (default 1)
-@@ -4476,6 +4490,8 @@ A jump table for the options with a short description can be found at |Q_op|.
+@@ -4476,6 +4490,8 @@ A jump table for the options with a shor
|single-repeat|, etc. Therefore over-the-spot style becomes the
default now. This should work fine for most people, however if you
have any problem with it, try using on-the-spot style.
@@ -146,7 +144,7 @@ index c269fea..7b25f20 100644
*'include'* *'inc'*
'include' 'inc' string (default "^\s*#\s*include")
-@@ -4512,6 +4528,7 @@ A jump table for the options with a short description can be found at |Q_op|.
+@@ -4512,6 +4528,7 @@ A jump table for the options with a shor
The expression will be evaluated in the |sandbox| when set from a
modeline, see |sandbox-option|.
@@ -154,7 +152,7 @@ index c269fea..7b25f20 100644
It is not allowed to change text or jump to another window while
evaluating 'includeexpr' |textlock|.
-@@ -4601,6 +4618,7 @@ A jump table for the options with a short description can be found at |Q_op|.
+@@ -4601,6 +4618,7 @@ A jump table for the options with a shor
The expression will be evaluated in the |sandbox| when set from a
modeline, see |sandbox-option|.
@@ -162,7 +160,7 @@ index c269fea..7b25f20 100644
It is not allowed to change text or jump to another window while
evaluating 'indentexpr' |textlock|.
-@@ -5227,6 +5245,12 @@ A jump table for the options with a short description can be found at |Q_op|.
+@@ -5227,6 +5245,12 @@ A jump table for the options with a shor
< This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
@@ -175,7 +173,7 @@ index c269fea..7b25f20 100644
*'matchpairs'* *'mps'*
'matchpairs' 'mps' string (default "(:),{:},[:]")
local to buffer
-@@ -5250,7 +5274,6 @@ A jump table for the options with a short description can be found at |Q_op|.
+@@ -5250,7 +5274,6 @@ A jump table for the options with a shor
*'matchtime'* *'mat'*
'matchtime' 'mat' number (default 5)
global
@@ -183,7 +181,7 @@ index c269fea..7b25f20 100644
Tenths of a second to show the matching paren, when 'showmatch' is
set. Note that this is not in milliseconds, like other options that
set a time. This is to be compatible with Nvi.
-@@ -5394,6 +5417,17 @@ A jump table for the options with a short description can be found at |Q_op|.
+@@ -5394,6 +5417,17 @@ A jump table for the options with a shor
'modeline' 'ml' boolean (Vim default: on (off for root),
Debian: off, Vi default: off)
local to buffer
@@ -201,7 +199,7 @@ index c269fea..7b25f20 100644
*'modelines'* *'mls'*
'modelines' 'mls' number (default 5)
global
-@@ -5405,9 +5439,9 @@ A jump table for the options with a short description can be found at |Q_op|.
+@@ -5405,9 +5439,9 @@ A jump table for the options with a shor
set and to the Vim default value when 'compatible' is reset.
*'modifiable'* *'ma'* *'nomodifiable'* *'noma'*
@@ -212,7 +210,7 @@ index c269fea..7b25f20 100644
When off the buffer contents cannot be changed. The 'fileformat' and
'fileencoding' options also can't be changed.
Can be reset on startup with the |-M| command line argument.
-@@ -6456,6 +6490,8 @@ A jump table for the options with a short description can be found at |Q_op|.
+@@ -6456,6 +6490,8 @@ A jump table for the options with a shor
When this option is not empty, it determines the content of the ruler
string, as displayed for the 'ruler' option.
The format of this option is like that of 'statusline'.
@@ -221,7 +219,7 @@ index c269fea..7b25f20 100644
The default ruler width is 17 characters. To make the ruler 15
characters wide, put "%15(" at the start and "%)" at the end.
Example: >
-@@ -7016,6 +7052,8 @@ A jump table for the options with a short description can be found at |Q_op|.
+@@ -7016,6 +7052,8 @@ A jump table for the options with a shor
q use "recording" instead of "recording @a"
F don't give the file info when editing a file, like `:silent`
was used for the command
@@ -230,7 +228,7 @@ index c269fea..7b25f20 100644
This gives you the opportunity to avoid that a change between buffers
requires you to hit <Enter>, but still gives as useful a message as
-@@ -7600,6 +7638,7 @@ A jump table for the options with a short description can be found at |Q_op|.
+@@ -7600,6 +7638,7 @@ A jump table for the options with a shor
The 'statusline' option will be evaluated in the |sandbox| if set from
a modeline, see |sandbox-option|.
@@ -238,7 +236,7 @@ index c269fea..7b25f20 100644
It is not allowed to change text or jump to another window while
evaluating 'statusline' |textlock|.
-@@ -7786,6 +7825,7 @@ A jump table for the options with a short description can be found at |Q_op|.
+@@ -7786,6 +7825,7 @@ A jump table for the options with a shor
When changing something that is used in 'tabline' that does not
trigger it to be updated, use |:redrawtabline|.
@@ -246,7 +244,7 @@ index c269fea..7b25f20 100644
Keep in mind that only one of the tab pages is the current one, others
are invisible and you can't jump to their windows.
-@@ -8329,8 +8369,11 @@ A jump table for the options with a short description can be found at |Q_op|.
+@@ -8329,8 +8369,11 @@ A jump table for the options with a shor
non-empty 't_ts' option).
When Vim was compiled with HAVE_X11 defined, the original title will
be restored if possible, see |X11|.
@@ -258,7 +256,7 @@ index c269fea..7b25f20 100644
Example: >
:auto BufEnter * let &titlestring = hostname() . "/" . expand("%:p")
:set title titlestring=%<%F%=%l/%L-%P titlelen=70
-@@ -8520,6 +8563,8 @@ A jump table for the options with a short description can be found at |Q_op|.
+@@ -8520,6 +8563,8 @@ A jump table for the options with a shor
undo file that exists is used. When it cannot be read an error is
given, no further entry is used.
See |undo-persistence|.
@@ -267,7 +265,7 @@ index c269fea..7b25f20 100644
*'undofile'* *'noundofile'* *'udf'* *'noudf'*
'undofile' 'udf' boolean (default off)
-@@ -8843,6 +8888,8 @@ A jump table for the options with a short description can be found at |Q_op|.
+@@ -8843,6 +8888,8 @@ A jump table for the options with a shor
When equal to "NONE" no viminfo file will be read or written.
This option can be set with the |-i| command line flag. The |--clean|
command line flag sets it to "NONE".
@@ -276,8 +274,6 @@ index c269fea..7b25f20 100644
*'virtualedit'* *'ve'*
'virtualedit' 've' string (default "")
-diff --git a/src/option.c b/src/option.c
-index 4b6157d..e1e89d5 100644
--- a/src/option.c
+++ b/src/option.c
@@ -462,6 +462,7 @@ struct vimoption
@@ -427,8 +423,6 @@ index 4b6157d..e1e89d5 100644
#ifdef FEAT_DIFF
/* In diff mode some options are overruled. This avoids that
* 'foldmethod' becomes "marker" instead of "diff" and that
-diff --git a/src/option.h b/src/option.h
-index 2985781..1cef928 100644
--- a/src/option.h
+++ b/src/option.h
@@ -640,6 +640,7 @@ EXTERN long p_mis; /* 'menuitems' */
@@ -439,11 +433,9 @@ index 2985781..1cef928 100644
EXTERN long p_mls; /* 'modelines' */
EXTERN char_u *p_mouse; /* 'mouse' */
#ifdef FEAT_GUI
-diff --git a/src/testdir/test49.in b/src/testdir/test49.in
-index 79f13f6..a0c9e0d 100644
--- a/src/testdir/test49.in
+++ b/src/testdir/test49.in
-@@ -5,7 +5,7 @@ test49.failed, try to add one or more "G"s at the line ending in "test.out"
+@@ -5,7 +5,7 @@ test49.failed, try to add one or more "G
STARTTEST
:so small.vim
@@ -452,8 +444,6 @@ index 79f13f6..a0c9e0d 100644
:lang mess C
:so test49.vim
:" Go back to this file and append the results from register r.
-diff --git a/src/testdir/test_modeline.vim b/src/testdir/test_modeline.vim
-index e0f97c4..101116c 100644
--- a/src/testdir/test_modeline.vim
+++ b/src/testdir/test_modeline.vim
@@ -60,14 +60,17 @@ func Test_modeline_keymap()
@@ -573,16 +563,14 @@ index e0f97c4..101116c 100644
+ call s:modeline_fails('tabline', 'tabline=Something()', 'E992:')
+ call s:modeline_fails('titlestring', 'titlestring=Something()', 'E992:')
endfunc
-diff --git a/src/version.c b/src/version.c
-index 3040409..2cbc426 100644
--- a/src/version.c
+++ b/src/version.c
-@@ -791,6 +791,8 @@ static char *(features[]) =
-
+@@ -792,6 +792,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
-+/**/
-+ 1366,
/**/
++ 1366,
++/**/
1365,
/**/
+ 1046,