Blame SOURCES/0001-patch-8.2.4215-illegal-memory-access-when-copying-li.patch
|
|
45b285 |
diff -up vim80/src/ex_cmds.c.cve0361 vim80/src/ex_cmds.c
|
|
|
45b285 |
--- vim80/src/ex_cmds.c.cve0361 2022-02-08 12:20:51.277666290 +0100
|
|
|
45b285 |
+++ vim80/src/ex_cmds.c 2022-02-08 12:20:51.280666209 +0100
|
|
|
45b285 |
@@ -983,6 +983,8 @@ ex_copy(linenr_T line1, linenr_T line2,
|
|
|
45b285 |
}
|
|
|
45b285 |
|
|
|
45b285 |
appended_lines_mark(n, count);
|
|
|
45b285 |
+ if (VIsual_active)
|
|
|
45b285 |
+ check_pos(curbuf, &VIsual);
|
|
|
45b285 |
|
|
|
45b285 |
msgmore((long)count);
|
|
|
45b285 |
}
|
|
|
45b285 |
diff -up vim80/src/testdir/test_visual.vim.cve0361 vim80/src/testdir/test_visual.vim
|
|
|
45b285 |
--- vim80/src/testdir/test_visual.vim.cve0361 2022-02-08 12:20:51.280666209 +0100
|
|
|
45b285 |
+++ vim80/src/testdir/test_visual.vim 2022-02-08 12:21:44.530356814 +0100
|
|
|
45b285 |
@@ -263,3 +263,17 @@ func Test_visual_block_append_invalid_ch
|
|
|
45b285 |
call assert_equal([' - let xxx', 'xxxxx -', 'xxxxxxxx-xxx'], getline(1, 3))
|
|
|
45b285 |
bwipe!
|
|
|
45b285 |
endfunc
|
|
|
45b285 |
+
|
|
|
45b285 |
+" this was leaving the end of the Visual area beyond the end of a line
|
|
|
45b285 |
+func Test_visual_ex_copy_line()
|
|
|
45b285 |
+ new
|
|
|
45b285 |
+ call setline(1, ["aaa", "bbbbbbbbbxbb"])
|
|
|
45b285 |
+ /x
|
|
|
45b285 |
+ exe "normal ggvjfxO"
|
|
|
45b285 |
+ t0
|
|
|
45b285 |
+ normal gNU
|
|
|
45b285 |
+ bwipe!
|
|
|
45b285 |
+endfunc
|
|
|
45b285 |
+
|
|
|
45b285 |
+
|
|
|
45b285 |
+" vim: shiftwidth=2 sts=2 expandtab
|