diff options
Diffstat (limited to 'debian/patches/CVE-2022-2285.patch')
-rw-r--r-- | debian/patches/CVE-2022-2285.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/debian/patches/CVE-2022-2285.patch b/debian/patches/CVE-2022-2285.patch new file mode 100644 index 0000000..5105f02 --- /dev/null +++ b/debian/patches/CVE-2022-2285.patch @@ -0,0 +1,40 @@ +From: Markus Koschany <apo@debian.org> +Date: Wed, 2 Nov 2022 22:34:23 +0100 +Subject: CVE-2022-2285 + +Origin: https://github.com/vim/vim/commit/27efc62f5d86afcb2ecb7565587fe8dea4b036fe +--- + src/term.c | 1 + + src/testdir/test_mapping.vim | 10 ++++++++++ + 2 files changed, 11 insertions(+) + +diff --git a/src/term.c b/src/term.c +index 47d2bda..bc46ed9 100644 +--- a/src/term.c ++++ b/src/term.c +@@ -4440,6 +4440,7 @@ check_termcode( + if (*tp == ESC && !p_ek && (State & INSERT)) + continue; + ++ tp[len] = NUL; + key_name[0] = NUL; /* no key name found yet */ + key_name[1] = NUL; /* no key name found yet */ + modifiers = 0; /* no modifiers yet */ +diff --git a/src/testdir/test_mapping.vim b/src/testdir/test_mapping.vim +index c454fc0..3c81bb5 100644 +--- a/src/testdir/test_mapping.vim ++++ b/src/testdir/test_mapping.vim +@@ -318,3 +318,13 @@ func Test_motionforce_omap() + delfunc Select + delfunc GetCommand + endfunc ++ ++func Test_using_past_typeahead() ++ nnoremap :00 0 ++ exe "norm :set \x80\xfb0=0\<CR>" ++ exe "sil norm :0\x0f\<C-U>\<CR>" ++ ++ exe "norm :set \x80\xfb0=\<CR>" ++ nunmap :00 ++endfunc ++ |