diff --git a/backport-CVE-2022-0361.patch b/backport-CVE-2022-0361.patch index 3983d3113a56d28d43d381a1e7bedd5bb0070470..f0ad2e0b4c918bf3f9f5111ff9b75d12b45f89cd 100644 --- a/backport-CVE-2022-0361.patch +++ b/backport-CVE-2022-0361.patch @@ -12,7 +12,7 @@ Solution: Adjust the Visual position after copying lines. 2 files changed, 13 insertions(+) diff --git a/src/ex_cmds.c b/src/ex_cmds.c -index fea6dfa..aa97b40 100644 +index 8f6444f..cccdf47 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -864,6 +864,8 @@ ex_copy(linenr_T line1, linenr_T line2, linenr_T n) @@ -25,12 +25,12 @@ index fea6dfa..aa97b40 100644 msgmore((long)count); } diff --git a/src/testdir/test_visual.vim b/src/testdir/test_visual.vim -index 049b617..4d2f71d 100644 +index 3ed927a..dbc28eb 100644 --- a/src/testdir/test_visual.vim +++ b/src/testdir/test_visual.vim -@@ -674,6 +674,17 @@ func Test_visual_undo_deletes_last_line() - bwipe! - endfunc +@@ -659,6 +659,17 @@ func Test_linewise_select_mode() + exe "normal GkkgH\" + call assert_equal(['', 'b', 'c'], getline(1, '$')) +" this was leaving the end of the Visual area beyond the end of a line +func Test_visual_ex_copy_line() diff --git a/backport-CVE-2022-0368.patch b/backport-CVE-2022-0368.patch index 3f2d221169a8fea72c6d617f5f8df0a9821f4771..8f34f2264f5d5a02cc1cbaa2321a08231d03bba2 100644 --- a/backport-CVE-2022-0368.patch +++ b/backport-CVE-2022-0368.patch @@ -12,12 +12,12 @@ Solution: Correct the Visual area after undo. 2 files changed, 17 insertions(+) diff --git a/src/testdir/test_visual.vim b/src/testdir/test_visual.vim -index 0705fdb..049b617 100644 +index dbc28eb..cf7e351 100644 --- a/src/testdir/test_visual.vim +++ b/src/testdir/test_visual.vim -@@ -659,6 +659,21 @@ func Test_linewise_select_mode() - exe "normal GkkgH\" - call assert_equal(['', 'b', 'c'], getline(1, '$')) +@@ -670,6 +670,21 @@ func Test_visual_ex_copy_line() + bwipe! + endfunc +" This was leaving the end of the Visual area beyond the end of a line. +" Set 'undolevels' to start a new undo block. diff --git a/backport-CVE-2022-0413.patch b/backport-CVE-2022-0413.patch index fd1cd7d138a17760fc4817fa30b4ad6e0e684f0b..dfc5fd41610f50f4c80b59cbaa939d99f85a1e21 100644 --- a/backport-CVE-2022-0413.patch +++ b/backport-CVE-2022-0413.patch @@ -12,10 +12,10 @@ Solution: Make a copy of the substitute text. 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/src/ex_cmds.c b/src/ex_cmds.c -index 8f6444f..fea6dfa 100644 +index cccdf47..aa97b40 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c -@@ -3575,6 +3575,7 @@ do_sub(exarg_T *eap) +@@ -3577,6 +3577,7 @@ do_sub(exarg_T *eap) int save_do_all; // remember user specified 'g' flag int save_do_ask; // remember user specified 'c' flag char_u *pat = NULL, *sub = NULL; // init for GCC @@ -23,7 +23,7 @@ index 8f6444f..fea6dfa 100644 int delimiter; int sublen; int got_quit = FALSE; -@@ -3864,11 +3865,20 @@ do_sub(exarg_T *eap) +@@ -3866,11 +3867,20 @@ do_sub(exarg_T *eap) sub_firstline = NULL; /* @@ -48,7 +48,7 @@ index 8f6444f..fea6dfa 100644 sub = regtilde(sub, p_magic); /* -@@ -4668,6 +4678,7 @@ outofmem: +@@ -4670,6 +4680,7 @@ outofmem: #endif vim_regfree(regmatch.regprog); diff --git a/vim.spec b/vim.spec index b71c30d6cea5be3584411d15e3c5cdfdd35f1a93..4692456fe1f684a165ae914df80e7a487b7c0c4f 100644 --- a/vim.spec +++ b/vim.spec @@ -12,7 +12,7 @@ Name: vim Epoch: 2 Version: 8.2 -Release: 24 +Release: 25 Summary: Vim is a highly configurable text editor for efficiently creating and changing any kind of text. License: Vim and MIT URL: http://www.vim.org @@ -470,6 +470,12 @@ popd %{_mandir}/man1/evim.* %changelog +* Mon Feb 07 2022 shixuantong - 2:8.2-25 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:fix patches error + * Mon Feb 07 2022 shixuantong - 2:8.2-24 - Type:CVE - ID:CVE-2022-0351 CVE-2022-0361 CVE-2022-0408 CVE-2022-0359 CVE-2022-0368 CVE-2022-0413