diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-08 05:08:16 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-08 05:08:16 +0000 |
commit | 37406d9074654510ff5ed9362800a23a943d80f4 (patch) | |
tree | 097a3866b08d2e85a159bf3f8e3a192b161821a8 /debian/patches/CVE-2022-1619.patch | |
parent | Adding debian version 2:8.1.0875-5+deb10u3. (diff) | |
download | vim-37406d9074654510ff5ed9362800a23a943d80f4.tar.xz vim-37406d9074654510ff5ed9362800a23a943d80f4.zip |
Adding debian version 2:8.1.0875-5+deb10u4.debian/2%8.1.0875-5+deb10u4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/CVE-2022-1619.patch')
-rw-r--r-- | debian/patches/CVE-2022-1619.patch | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/debian/patches/CVE-2022-1619.patch b/debian/patches/CVE-2022-1619.patch new file mode 100644 index 0000000..121a1b7 --- /dev/null +++ b/debian/patches/CVE-2022-1619.patch @@ -0,0 +1,74 @@ +From ef02f16609ff0a26ffc6e20263523424980898fe Mon Sep 17 00:00:00 2001 +From: Bram Moolenaar <Bram@vim.org> +Date: Sat, 7 May 2022 10:49:10 +0100 +Subject: [PATCH] patch 8.2.4899: with latin1 encoding CTRL-W might go before + the cmdline + +Problem: With latin1 encoding CTRL-W might go before the start of the + command line. +Solution: Check already being at the start of the command line. +--- + src/ex_getln.c | 11 +++++++---- + src/testdir/test_cmdline.vim | 3 +++ + src/version.c | 2 ++ + 3 files changed, 12 insertions(+), 4 deletions(-) + +diff --git a/src/ex_getln.c b/src/ex_getln.c +index a97024b35171..7020f5143a01 100644 +--- a/src/ex_getln.c ++++ b/src/ex_getln.c +@@ -1635,10 +1635,13 @@ + { + while (p > ccline.cmdbuff && vim_isspace(p[-1])) + --p; +- i = vim_iswordc(p[-1]); +- while (p > ccline.cmdbuff && !vim_isspace(p[-1]) +- && vim_iswordc(p[-1]) == i) +- --p; ++ if (p > ccline.cmdbuff) ++ { ++ i = vim_iswordc(p[-1]); ++ while (p > ccline.cmdbuff && !vim_isspace(p[-1]) ++ && vim_iswordc(p[-1]) == i) ++ --p; ++ } + } + else + --p; +diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim +index 474638fb00d6..5a849f77f755 100644 +--- a/src/testdir/test_cmdline.vim ++++ b/src/testdir/test_cmdline.vim +@@ -641,6 +641,19 @@ + let &lines = lines + let &columns = columns + endfunc ++ ++func Test_cmdline_remove_char() ++ let encoding_save = &encoding ++ ++ for e in ['utf8', 'latin1'] ++ exe 'set encoding=' . e ++ ++ " This was going before the start in latin1. ++ call feedkeys(": \<C-W>\<CR>", 'tx') ++ endfor ++ ++ let &encoding = encoding_save ++endfunc + + + set cpo& +diff --git a/src/version.c b/src/version.c +index 201d26f06eb9..05888c722e8e 100644 +--- a/src/version.c ++++ b/src/version.c +@@ -795,6 +795,8 @@ static char *(features[]) = + 805, + /**/ + 5024, ++/**/ ++ 4899, + /**/ + 4428, + /**/ |