summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/vim/files/CVE-2021-3927.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/vim/files/CVE-2021-3927.patch')
-rw-r--r--meta/recipes-support/vim/files/CVE-2021-3927.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/meta/recipes-support/vim/files/CVE-2021-3927.patch b/meta/recipes-support/vim/files/CVE-2021-3927.patch
new file mode 100644
index 0000000000..90b1b6b82e
--- /dev/null
+++ b/meta/recipes-support/vim/files/CVE-2021-3927.patch
@@ -0,0 +1,32 @@
1From f334a87204b4aab76536063b37b4d4a10be46a3a Mon Sep 17 00:00:00 2001
2From: Bram Moolenaar <Bram@vim.org>
3Date: Wed, 17 Nov 2021 11:09:48 +0800
4Subject: [PATCH] patch 8.2.3581: reading character past end of line
5
6Problem: Reading character past end of line.
7Solution: Correct the cursor column.
8
9CVE: CVE-2021-3927
10
11Upstream-Status: Backport [https://github.com/vim/vim/commit/0b5b06cb4777d1401fdf83e7d48d287662236e7e]
12
13Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
14---
15 src/ex_docmd.c | 1 +
16 1 file changed, 1 insertion(+)
17
18diff --git a/src/ex_docmd.c b/src/ex_docmd.c
19index 89d33ba90..54d7f4cb3 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 }
30--
312.17.1
32