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