summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/vim/files/0001-patch-8.2.3581-reading-character-past-end-of-line.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/vim/files/0001-patch-8.2.3581-reading-character-past-end-of-line.patch')
-rw-r--r--meta/recipes-support/vim/files/0001-patch-8.2.3581-reading-character-past-end-of-line.patch62
1 files changed, 0 insertions, 62 deletions
diff --git a/meta/recipes-support/vim/files/0001-patch-8.2.3581-reading-character-past-end-of-line.patch b/meta/recipes-support/vim/files/0001-patch-8.2.3581-reading-character-past-end-of-line.patch
deleted file mode 100644
index 28c61cd782..0000000000
--- a/meta/recipes-support/vim/files/0001-patch-8.2.3581-reading-character-past-end-of-line.patch
+++ /dev/null
@@ -1,62 +0,0 @@
1CVE: CVE-2021-3927
2Upstream-Status: Backport
3Signed-off-by: Ross Burton <ross.burton@arm.com>
4
5From 93b427c6e729260d0700c3b2804ec153bc8284fa Mon Sep 17 00:00:00 2001
6From: Bram Moolenaar <Bram@vim.org>
7Date: Thu, 4 Nov 2021 15:10:11 +0000
8Subject: [PATCH] patch 8.2.3581: reading character past end of line
9
10Problem: Reading character past end of line.
11Solution: Correct the cursor column.
12---
13 src/ex_docmd.c | 1 +
14 src/testdir/test_put.vim | 12 ++++++++++++
15 src/version.c | 2 ++
16 3 files changed, 15 insertions(+)
17
18diff --git a/src/ex_docmd.c b/src/ex_docmd.c
19index fde726477..59e245bee 100644
20--- a/src/ex_docmd.c
21+++ b/src/ex_docmd.c
22@@ -6905,6 +6905,7 @@ ex_put(exarg_T *eap)
23 eap->forceit = TRUE;
24 }
25 curwin->w_cursor.lnum = eap->line2;
26+ check_cursor_col();
27 do_put(eap->regname, eap->forceit ? BACKWARD : FORWARD, 1L,
28 PUT_LINE|PUT_CURSLINE);
29 }
30diff --git a/src/testdir/test_put.vim b/src/testdir/test_put.vim
31index 225ebd1f3..922e5b269 100644
32--- a/src/testdir/test_put.vim
33+++ b/src/testdir/test_put.vim
34@@ -113,3 +113,15 @@ func Test_put_p_indent_visual()
35 call assert_equal('select that text', getline(2))
36 bwipe!
37 endfunc
38+
39+func Test_put_above_first_line()
40+ new
41+ let @" = 'text'
42+ silent! normal 0o00
43+ 0put
44+ call assert_equal('text', getline(1))
45+ bwipe!
46+endfunc
47+
48+
49+" vim: shiftwidth=2 sts=2 expandtab
50diff --git a/src/version.c b/src/version.c
51index a9e8be0e7..df4ec9a47 100644
52--- a/src/version.c
53+++ b/src/version.c
54@@ -742,6 +742,8 @@ static char *(features[]) =
55
56 static int included_patches[] =
57 { /* Add new patch number below this line */
58+/**/
59+ 3581,
60 /**/
61 3564,
62 /**/