diff options
Diffstat (limited to 'debian/patches/CVE-2022-0319.patch')
-rw-r--r-- | debian/patches/CVE-2022-0319.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/debian/patches/CVE-2022-0319.patch b/debian/patches/CVE-2022-0319.patch new file mode 100644 index 0000000..f8c0add --- /dev/null +++ b/debian/patches/CVE-2022-0319.patch @@ -0,0 +1,47 @@ +From: Markus Koschany <apo@debian.org> +Date: Sun, 23 Oct 2022 17:11:51 +0200 +Subject: CVE-2022-0319 + +Origin: https://github.com/vim/vim/commit/05b27615481e72e3b338bb12990fb3e0c2ecc2a9 +--- + src/testdir/test_visual.vim | 10 ++++++++++ + src/window.c | 5 +++++ + 2 files changed, 15 insertions(+) + +diff --git a/src/testdir/test_visual.vim b/src/testdir/test_visual.vim +index afeb4da..0841952 100644 +--- a/src/testdir/test_visual.vim ++++ b/src/testdir/test_visual.vim +@@ -3,6 +3,16 @@ if !has('visual') + finish + endif + ++" this was causing an ml_get error ++func Test_visual_exchange_windows() ++ enew! ++ new ++ call setline(1, ['foo', 'bar']) ++ exe "normal G\<C-V>gg\<C-W>\<C-X>OO\<Esc>" ++ bwipe! ++ bwipe! ++endfunc ++ + + func Test_block_shift_multibyte() + " Uses double-wide character. +diff --git a/src/window.c b/src/window.c +index f78fcca..7c7f580 100644 +--- a/src/window.c ++++ b/src/window.c +@@ -1576,6 +1576,11 @@ win_exchange(long Prenum) + + (void)win_comp_pos(); /* recompute window positions */ + ++ if (wp->w_buffer != curbuf) ++ reset_VIsual_and_resel(); ++ else if (VIsual_active) ++ wp->w_cursor = curwin->w_cursor; ++ + win_enter(wp, TRUE); + redraw_all_later(NOT_VALID); + } |