summaryrefslogtreecommitdiffstats
path: root/debian/patches/CVE-2022-1785.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/CVE-2022-1785.patch')
-rw-r--r--debian/patches/CVE-2022-1785.patch18
1 files changed, 6 insertions, 12 deletions
diff --git a/debian/patches/CVE-2022-1785.patch b/debian/patches/CVE-2022-1785.patch
index 1d3817f..d3789a3 100644
--- a/debian/patches/CVE-2022-1785.patch
+++ b/debian/patches/CVE-2022-1785.patch
@@ -15,11 +15,9 @@ Solution: Disallow changing window in substitute expression.
Backport: Use textlock instead of textwinlock. In this version, textwinlock
wasn't yet split out from textlock and it'll get merged back later.
-diff --git a/src/ex_cmds.c b/src/ex_cmds.c
-index 7e730becb48f..210e21fe7a5b 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
-@@ -5576,12 +5576,17 @@ ex_substitute(exarg_T *eap)
+@@ -5576,12 +5576,17 @@ do_sub(exarg_T *eap)
/* Save flags for recursion. They can change for e.g.
* :s/^/\=execute("s#^##gn") */
subflags_save = subflags;
@@ -37,7 +35,7 @@ index 7e730becb48f..210e21fe7a5b 100644
/* Don't keep flags set by a recursive call. */
subflags = subflags_save;
if (subflags.do_count)
-@@ -5670,9 +5675,15 @@ ex_substitute(exarg_T *eap)
+@@ -5670,9 +5675,15 @@ do_sub(exarg_T *eap)
mch_memmove(new_end, sub_firstline + copycol, (size_t)copy_len);
new_end += copy_len;
@@ -53,8 +51,6 @@ index 7e730becb48f..210e21fe7a5b 100644
sub_nsubs++;
did_sub = TRUE;
-diff --git a/src/testdir/test_substitute.vim b/src/testdir/test_substitute.vim
-index f3fd7ab1ce77..a1c324ed8d20 100644
--- a/src/testdir/test_substitute.vim
+++ b/src/testdir/test_substitute.vim
@@ -517,3 +517,16 @@ func Test_using_old_sub()
@@ -74,16 +70,14 @@ index f3fd7ab1ce77..a1c324ed8d20 100644
+ delfunc Repl
+endfunc
+
-diff --git a/src/version.c b/src/version.c
-index 4c63ea0771ad..782642b5d5a1 100644
--- a/src/version.c
+++ b/src/version.c
-@@ -795,6 +795,8 @@ static char *(features[]) =
- 805,
+@@ -796,6 +796,8 @@ static int included_patches[] =
/**/
5024,
-+/**/
-+ 4977,
/**/
++ 4977,
++/**/
4921,
/**/
+ 4919,