summaryrefslogtreecommitdiffstats
path: root/debian/patches/CVE-2021-3927.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/CVE-2021-3927.patch')
-rw-r--r--debian/patches/CVE-2021-3927.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/debian/patches/CVE-2021-3927.patch b/debian/patches/CVE-2021-3927.patch
new file mode 100644
index 0000000..592f425
--- /dev/null
+++ b/debian/patches/CVE-2021-3927.patch
@@ -0,0 +1,36 @@
+From: Markus Koschany <apo@debian.org>
+Date: Wed, 19 Oct 2022 19:13:54 +0200
+Subject: CVE-2021-3927
+
+Origin: https://github.com/vim/vim/commit/0b5b06cb4777d1401fdf83e7d48d287662236e7e
+---
+ src/ex_docmd.c | 1 +
+ src/testdir/test_put.vim | 10 ++++++++++
+ 2 files changed, 11 insertions(+)
+
+--- a/src/ex_docmd.c
++++ b/src/ex_docmd.c
+@@ -9487,6 +9487,7 @@ ex_put(exarg_T *eap)
+ eap->forceit = TRUE;
+ }
+ curwin->w_cursor.lnum = eap->line2;
++ check_cursor_col();
+ do_put(eap->regname, eap->forceit ? BACKWARD : FORWARD, 1L,
+ PUT_LINE|PUT_CURSLINE);
+ }
+--- a/src/testdir/test_put.vim
++++ b/src/testdir/test_put.vim
+@@ -101,3 +101,13 @@ func Test_put_p_errmsg_nodup()
+ delfunction Capture_p_error
+ bwipeout!
+ endfunc
++
++func Test_put_above_first_line()
++ new
++ let @" = 'text'
++ silent! normal 0o00
++ 0put
++ call assert_equal('text', getline(1))
++ bwipe!
++endfunc
++