summaryrefslogtreecommitdiffstats
path: root/debian/patches/CVE-2022-3134.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/CVE-2022-3134.patch')
-rw-r--r--debian/patches/CVE-2022-3134.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/debian/patches/CVE-2022-3134.patch b/debian/patches/CVE-2022-3134.patch
new file mode 100644
index 0000000..16f8949
--- /dev/null
+++ b/debian/patches/CVE-2022-3134.patch
@@ -0,0 +1,29 @@
+From: Markus Koschany <apo@debian.org>
+Date: Mon, 7 Nov 2022 00:33:16 +0100
+Subject: CVE-2022-3134
+
+Origin: https://github.com/vim/vim/commit/ccfde4d028e891a41e3548323c3d47b06fb0b83e
+---
+ src/tag.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/src/tag.c b/src/tag.c
+index 4e96da3..6fcd6ee 100644
+--- a/src/tag.c
++++ b/src/tag.c
+@@ -539,6 +539,15 @@ do_tag(
+ max_num_matches = MAXCOL; /* If less than max_num_matches
+ found: all matches found. */
+
++ // A tag function may do anything, which may cause various
++ // information to become invalid. At least check for the tagstack
++ // to still be the same.
++ if (tagstack != curwin->w_tagstack)
++ {
++ FreeWild(new_num_matches, new_matches);
++ break;
++ }
++
+ /* If there already were some matches for the same name, move them
+ * to the start. Avoids that the order changes when using
+ * ":tnext" and jumping to another file. */